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

[Issue] Can't pass integration test #15

Closed
kafiln opened this issue Oct 17, 2020 · 7 comments · Fixed by #16
Closed

[Issue] Can't pass integration test #15

kafiln opened this issue Oct 17, 2020 · 7 comments · Fixed by #16

Comments

@kafiln
Copy link
Contributor

kafiln commented Oct 17, 2020

Hello and thank you for your amazing work.

I have read the README and followed all the instructions but I can't seem the make the integration.test.ts pass !

It seems like it's not connected to the DB so it can't create a user nor an apiKey, which make all the tests related to it throw error like

TypeError: Cannot read property 'key' of null

Any idea why is this happening ? Am I missing something ?

Thank you 👍

@janishar
Copy link
Owner

@kafiln Did you use Docker or Manual installation?

@kafiln
Copy link
Contributor Author

kafiln commented Oct 18, 2020

@janishar I tried both ! same result

@janishar janishar linked a pull request Oct 19, 2020 that will close this issue
@janishar
Copy link
Owner

@kafiln did this PR solved your issue?

@kafiln
Copy link
Contributor Author

kafiln commented Oct 19, 2020

@janishar no, it's not related

@kafiln
Copy link
Contributor Author

kafiln commented Oct 22, 2020

@janishar do you pass integration test ? I don't see in the code where the test connect to the db ? Or is it mocked ?
Thank you for your help 👍

@janishar
Copy link
Owner

janishar commented Oct 25, 2020

Yes it creates the test db.
To run the test please verify that you are doing the following:

  1. Run the docker for the mongo instance
  2. Verify that port 27017 is accessible on the localhost and is open
  3. You have created .env.test with the database config
...
#Databse 
DB_NAME=afteracademy-blog-test-db
DB_HOST=localhost
DB_PORT=27017
DB_USER=afteracademy-blog-test-db-user
DB_USER_PWD=changeit
...

Alos, if you can share error logs then I can look into it

@kafiln
Copy link
Contributor Author

kafiln commented Oct 31, 2020

Thank you for your help 👍

@kafiln kafiln closed this as completed Oct 31, 2020
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 a pull request may close this issue.

2 participants