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

Small updates for local testing of server tests like in CircleCI #3481

Merged
merged 2 commits into from Feb 8, 2020

Conversation

@chrisgilmerproj
Copy link
Contributor

chrisgilmerproj commented Feb 6, 2020

Description

I tried running locally but the DB in the docker-compose file wasn't working. This PR fixes that, adds a dependency, and also an extra target for tearing it down. Nothing fancy here.

make server_test_docker
make server_test_docker_down
@chrisgilmerproj chrisgilmerproj requested review from gidjin, reggieriser, tinyels and transcom/truss-infra Feb 6, 2020
Copy link
Contributor

reggieriser left a comment

This seemed to work, although I didn't get a prompt back when server_test_docker was done. I double-checked master and I do get the prompt back there. Is there a change here that's causing that?

@mr337

This comment has been minimized.

Copy link
Contributor

mr337 commented Feb 6, 2020

Getting same issue as @reggieriser

@chrisgilmerproj

This comment has been minimized.

Copy link
Contributor Author

chrisgilmerproj commented Feb 6, 2020

@reggieriser @mr337 - I'm looking into it now. We definitely want to be using the postgres container inside the docker-compose file because we're after the same performance as on CircleCI via compatibility mode. If we use the DB hosted on docker outside of the compose file then we don't have that performance bottleneck, which eliminates the point of testing this way.

@chrisgilmerproj

This comment has been minimized.

Copy link
Contributor Author

chrisgilmerproj commented Feb 6, 2020

I figured it out. When we were only running one container and it exited then docker-compose had no reason to stay open. With my change there are two containers and the DB container has no reason to exit. So I added the flag --abort-on-container-exit which should do the trick.

I did see test failures when I ran this. After exit you can run less tmp/test-results/gotest/go-test.out and look at what is going on.

@mr337
mr337 approved these changes Feb 6, 2020
Copy link
Contributor

mr337 left a comment

Looks to be working great 🚢

@chrisgilmerproj chrisgilmerproj self-assigned this Feb 7, 2020
@chrisgilmerproj chrisgilmerproj merged commit d41b0bb into master Feb 8, 2020
15 checks passed
15 checks passed
ci/circleci: acceptance_tests_experimental Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_local Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_staging Your tests passed on CircleCI!
Details
ci/circleci: build_app Your tests passed on CircleCI!
Details
ci/circleci: build_migrations Your tests passed on CircleCI!
Details
ci/circleci: build_storybook_app Your tests passed on CircleCI!
Details
ci/circleci: build_tasks Your tests passed on CircleCI!
Details
ci/circleci: build_tools Your tests passed on CircleCI!
Details
ci/circleci: check_generated_code Your tests passed on CircleCI!
Details
ci/circleci: client_test Your tests passed on CircleCI!
Details
ci/circleci: integration_tests Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_golang Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_yarn Your tests passed on CircleCI!
Details
ci/circleci: pre_test Your tests passed on CircleCI!
Details
ci/circleci: server_test Your tests passed on CircleCI!
Details
@chrisgilmerproj chrisgilmerproj deleted the cg_local_circleci_server_test_updates branch Feb 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.