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

Postgre/API never came up #62

Closed
uguryiilmz opened this issue Mar 22, 2023 · 2 comments
Closed

Postgre/API never came up #62

uguryiilmz opened this issue Mar 22, 2023 · 2 comments

Comments

@uguryiilmz
Copy link

In chapter 4 for the service layer, when i run the end to end tests i keep getting this error. When i try to comment out postgresql and use sqllite intead, the error turn insto api never came up. Are end to end tests supposed to use real database? I thought they would use sqllite like integration tests. These are the errors i'm getting.
Screen Shot 2023-03-21 at 11 40 29 PM
Screen Shot 2023-03-21 at 11 41 26 PM

when i try to dive deeper, i noticed the error is coming from web server

Screen Shot 2023-03-21 at 11 42 32 PM

any idea why this might be happening? Thanks for the great book, it helped me a lot!

@uguryiilmz
Copy link
Author

I was able to run the end-to-end tests with the following approach:

my first misunderstanding was that end to end tests need a service up to run. it expects you to run the flask server on port 5001. however, docker is not really working -i noticed there were some issues related to that here. so i needed to run my flask server locally on a separate terminal on port 5001, then when i run the tests they all passed successfully.

@hjwp
Copy link
Contributor

hjwp commented May 9, 2023

if you're copying the code in the repo, there's a dockerfile and a docker-compose config for runing the api + flask?

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

No branches or pull requests

2 participants