From 9cd7100242787719c1db400212d84c812d39263a Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Fri, 13 Sep 2024 22:33:28 +0100 Subject: [PATCH] fix_: stop_signal --- _assets/scripts/run_integration_tests.sh | 8 ++++++-- integration-tests/docker-compose.test.status-go.yml | 7 ++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/_assets/scripts/run_integration_tests.sh b/_assets/scripts/run_integration_tests.sh index 855c92af4..fcfd82395 100755 --- a/_assets/scripts/run_integration_tests.sh +++ b/_assets/scripts/run_integration_tests.sh @@ -30,6 +30,10 @@ all_compose_files="-f ${root_path}/docker-compose.anvil.yml -f ${root_path}/dock echo -e "${GRN}Running tests${RST}, HEAD: $(git rev-parse HEAD)" docker-compose ${all_compose_files} up -d --build --remove-orphans +# Stop containers +echo -e "${GRN}Stopping docker containers${RST}" +docker-compose ${all_compose_files} stop + # Save logs echo -e "${GRN}Saving logs${RST}" docker-compose ${all_compose_files} logs -f tests-rpc > "${root_path}/tests-rpc.log" @@ -39,8 +43,8 @@ docker-compose ${all_compose_files} logs status-go-no-funds > "${root_path}/stat # Retrieve exit code exit_code=$(docker inspect integration-tests_tests-rpc_1 -f '{{.State.ExitCode}}'); -# Stop and remove containers -echo -e "${GRN}Stopping docker containers${RST}" +# Cleanup containers +echo -e "${GRN}Removing docker containers${RST}" docker-compose ${all_compose_files} down # Collect coverage reports diff --git a/integration-tests/docker-compose.test.status-go.yml b/integration-tests/docker-compose.test.status-go.yml index 415aee5ed..67fe118d6 100644 --- a/integration-tests/docker-compose.test.status-go.yml +++ b/integration-tests/docker-compose.test.status-go.yml @@ -10,11 +10,10 @@ services: build_flags: -cover -ldflags="-X github.com/status-im/status-go/params.Version= -X github.com/status-im/status-go/params.GitCommit=11f83780d -X github.com/status-im/status-go/params.IpfsGatewayURL=https://ipfs.status.im/ -X github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/metrics.EnabledStr=true" entrypoint: [ "statusd", - "--log", "DEBUG", "-c", "/static/configs/config.json", "--seed-phrase", "test test test test test test test test test test test junk", "--password", "Strong12345", - "--dir", "/tmp/status-go-data", # Keep in sync with `config.json/DataDir` value. Later this arg not be needed. + "--dir", "/tmp/status-go-data", # Keep in sync with `config.json/DataDir` value. Later this arg will not be needed. ] ports: - 3333:3333 @@ -27,6 +26,7 @@ services: GOCOVERDIR: "/coverage/binary" volumes: - ./coverage/binary:/coverage/binary + stop_signal: SIGINT # TODO: Remove this duplication when implemented: https://github.com/status-im/status-go/issues/5803 status-go-no-funds: @@ -43,7 +43,7 @@ services: "-c", "/static/configs/config.json", "--seed-phrase", "test test test test test test test test test test test takoe", "--password", "Strong12345", - "--dir", "/tmp/status-go-data", # Keep in sync with `config.json/DataDir` value. Later this arg not be needed. + "--dir", "/tmp/status-go-data", # Keep in sync with `config.json/DataDir` value. Later this arg will not be needed. ] ports: - 3334:3333 @@ -56,6 +56,7 @@ services: GOCOVERDIR: "/coverage/binary" volumes: - ./coverage/binary:/coverage/binary + stop_signal: SIGINT tests-rpc: user: ${INTEGRATION_TESTS_DOCKER_UID}