Closed otomn closed 3 years ago
@umar-ahmed Auto test is failing due to database not setup. Any solution?
@umar-ahmed Auto test is failing due to database not setup. Any solution?
Not sure why frontend build is failing, maybe try resetting package-lock.json
and running npm install
from root again.
In terms of the backend tests, there are two options:
Verify the log output:
❓ Missing some expected output
backend-local | 18:56:33 connect(dateam@dateam); useCount: 0
backend-local | 18:56:33 select count(*) from item
backend-local | 18:56:34 disconnect(dateam@dateam)
backend-local | { count: '0' }
Also frontend-local did not start up. Not sure if the discrepancies are related
❓ Same as above.. missing some expected output
@otomn For the most part, seems good, however some expected output is missing in both cases (the last 4 lines)
In the previous commit, I deleted the test query. I have added it back because we need it to see if the database schema is setup properly or not.
.env.template
is updated, update the local .env
before running the test
The rest of the steps are the same
Expected output for docker test:
backend-local |
backend-local | > @dateam/backend@1.0.0 start
backend-local | > node ./build/Server.js
backend-local |
backend-local | {
backend-local | host: 'postgres',
backend-local | port: 5432,
backend-local | database: 'dateam',
backend-local | user: 'dateam',
backend-local | password: 'dateam'
backend-local | }
backend-local | 21:22:42 connect(dateam@dateam); useCount: 0
backend-local | 21:22:42 SELECT count(*) FROM item
backend-local | 21:22:42 disconnect(dateam@dateam)
backend-local | Dabase is setup
Expected output for local test:
node build/Server.js
{
host: 'localhost',
port: 5432,
database: 'dateam',
user: 'dateam',
password: 'dateam'
}
16:24:01 connect(dateam@dateam); useCount: 0
16:24:01 SELECT count(*) FROM item
16:24:01 disconnect(dateam@dateam)
Dabase is setup
@PersonalCorrect please test again
✔️ QA Pass
❌ QA Fail: Error executing one of the queries Log:
Hmm, I still keep getting the same error when doing the local test. I followed all steps listed (ensuring dbdata folder is deleted). The production/docker test still passes; this is only an issue with the local test.
Some things I noticed (which might help debugging?):
Description
Checklist
QA Steps
Production docker compose setting
Local development setting
DB_HOST=localhost
database system is ready to accept connections
node build/Server.js