Run three of the tests:
node_modules/.bin/mocha test/user.integration.js test/discussion.integration.js test/task.integration.js --bail -t 10000
Background/Context
Okay, this is important:
The tests now all use the same DB. Before each test is executed the tables in the DB are dropped and recreated.
I separated the DB's for testing and for development locally. So you would need these .env variables:
INDABA_PG_DB=indaba_devINDABA_PG_TEST_DB=indaba_test and you would need to create the DB's. The DB's really only need to be created once, unless you drop them for whatever reason.
The tests now use mock- so where ever we use request-promise to communicate with other services, in order for the test not to rely on those services running, any request made to them returns a 200.
The seed.js script now actually communicates with the other services in order to properly seed the greyscale DB/tables. Next step for this would be to create a file that would contain actual seed data (project, workflows, UOA's etc) to use for seeding (created in INBA-847).
If this PR fixes a bug, you must add test cases representative of the bug.
Please refer to Tettra for PR review guidelines.
What does this PR do?
Fixes:
user.integration
,discussion.integration
andtask.integration
And adds instruction to the PR template for making sure tests passRelated JIRA tickets:
https://jira.amida-tech.com/browse/INBA-520
How should this be manually tested?
Run three of the tests:
node_modules/.bin/mocha test/user.integration.js test/discussion.integration.js test/task.integration.js --bail -t 10000
Background/Context
Okay, this is important:
INDABA_PG_DB=indaba_dev
INDABA_PG_TEST_DB=indaba_test
and you would need to create the DB's. The DB's really only need to be created once, unless you drop them for whatever reason.mock
- so where ever we userequest-promise
to communicate with other services, in order for the test not to rely on those services running, any request made to them returns a200
.seed.js
script now actually communicates with the other services in order to properly seed the greyscale DB/tables. Next step for this would be to create a file that would contain actual seed data (project, workflows, UOA's etc) to use for seeding (created in INBA-847).Screenshots (if appropriate):