Skip to content

Commit

Permalink
make docker exec smoke test options configurable for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault committed Sep 14, 2023
1 parent b37e1d7 commit 45dba29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
env:
# override make command to install directly in active python
CONDA_CMD: ""
DOCKER_TEST_EXEC_ARGS: "-T"
services:
# Label used to access the service container
mongodb:
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,7 @@ docker-push: docker-push-base docker-push-manager docker-push-worker ## push al
# if compose up fails, print the logs and force stop
# if compose up succeeds, query weaver to get frontpage response
DOCKER_TEST_COMPOSES := -f "$(APP_ROOT)/tests/smoke/docker-compose.smoke-test.yml"
DOCKER_TEST_EXEC_ARGS ?=
.PHONY: docker-test
docker-test: docker-build stop ## execute smoke test of the built images (validate that they boots and reply)
@echo "Smoke test of built application docker images"
Expand All @@ -811,7 +812,7 @@ docker-test: docker-build stop ## execute smoke test of the built images (valida
@curl localhost:4001 | grep "Weaver Information" || \
( docker-compose $(DOCKER_TEST_COMPOSES) logs weaver worker || true && \
docker-compose $(DOCKER_TEST_COMPOSES) stop; exit 1 )
docker exec -ti smoke_test_weaver bash /tests/run_tests.sh
docker-compose $(DOCKER_TEST_COMPOSES) exec $(DOCKER_TEST_EXEC_ARGS) weaver bash /tests/run_tests.sh
docker-compose $(DOCKER_TEST_COMPOSES) stop

.PHONY: docker-stat
Expand Down

0 comments on commit 45dba29

Please sign in to comment.