Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/test env #18

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Feature/test env #18

wants to merge 4 commits into from

Conversation

hmayenve
Copy link

@hmayenve hmayenve commented Sep 17, 2019

Related JIRA tickets:

Please enter the whole URL so we can just click/copy it

What exactly does this PR do?

i.e. Added logic to do the thing because the thing didn't exist before. Please provide as much detail as possible.

  • This PR create and incorporates a .env.test for running the tests instead of using the same .env used for development purposes. In addition, a directory hl7-uploads-test is created to temporary stores the 500HL7Messages.txt produced by the tests.
  • Removes the 500HL7Messages.txt created after running the yarn test. This allows you to run the tests over and over again. Before, you had to manually delete 500HL7Messages.txt in order to pass all tests. If you ran the tests with 500HL7Messages.txt still in data/hl7-uploads, some tests would fail.

Do ANY of these changes introduce a breaking change? (in-scope or otherwise)

i.e. Users need to update their .env files with the following... etc

  • No.

Manual test cases?

Steps to manually test introduced changes can go here.
Remember the prerequisites!
Remember edge-cases you've caught in your code, etc..
i.e. ignoring the button and clicking on the "NEXT" button should trigger a warning event because the thing that clicking the new button does didn't happen

Case 1

  • Checkout branch
  • run server and db
  • run yarn test
  • At the beginning of the output of the test, ensure the the following text appears: config.js: Using .env.test
  • This means that tests are using the .env.test env file and not the .env for development
    After running yarn test, ensure that you have the following directory: data/hl7-uploads-test/ and that it's empty, meaning it doesn't have the file 500HL7Messages.txt in it.
  • You can run yarn test more than once without failing any tests. This is something we couldn't do before this PR.

Case 2

  • Now run yarn start
  • At the beginning of the output, you should see the text config.js: Using .env

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant