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

Update the docker compose command for the integration tests #111

Merged
merged 5 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ jobs:

- name: Integration Tests
run: |
cd examples/
docker-compose build overview_srv
docker-compose run overview_srv pytest --tb=short
cd examples/intro/
docker compose build overview_srv
docker compose run overview_srv pytest --tb=short
2 changes: 1 addition & 1 deletion examples/intro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ to allow us to write solid integration tests that dont involved mockig the code

To run the tests use docker-compose to create the necessary containers.

`docker-compose run overview_srv pytest --tb=short`
`docker compose run overview_srv pytest --tb=short`

## How we use this example code base

Expand Down
8 changes: 4 additions & 4 deletions examples/intro/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3"
services:
overview_srv:
build:
context: ../
context: ../../
dockerfile: examples/intro/Dockerfile
ports:
- "5001:5001"
Expand All @@ -13,17 +13,17 @@ services:
- "host.docker.internal:host-gateway"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ..:/app/
- ../../:/app/
- .:/app/example/
command: uvicorn product_mock.overview_service:app --host=0.0.0.0 --port=5001

products_srv:
build:
context: ../
context: ../../
dockerfile: examples/intro/Dockerfile
ports:
- "5002:5002"
volumes:
- ..:/app/
- ../../:/app/
- .:/app/example/
command: uvicorn product_mock.products_service:app --host=0.0.0.0 --port=5002
Loading