From 1b3d5a095617a23a9749b8adcd09c4ce1645c3e3 Mon Sep 17 00:00:00 2001 From: Jose Celano Date: Wed, 22 Nov 2023 19:20:47 +0000 Subject: [PATCH] ci: [#203] stop containers running E2E tests when tests fail --- contrib/dev-tools/container/e2e/mysql/run-e2e-tests.sh | 3 +-- contrib/dev-tools/container/e2e/sqlite/run-e2e-tests.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/dev-tools/container/e2e/mysql/run-e2e-tests.sh b/contrib/dev-tools/container/e2e/mysql/run-e2e-tests.sh index 0d2057fa..8706e1ae 100755 --- a/contrib/dev-tools/container/e2e/mysql/run-e2e-tests.sh +++ b/contrib/dev-tools/container/e2e/mysql/run-e2e-tests.sh @@ -45,8 +45,7 @@ TORRUST_INDEX_E2E_SHARED=true \ TORRUST_INDEX_E2E_PATH_CONFIG="./share/default/config/index.e2e.container.mysql.toml" \ TORRUST_INDEX_E2E_DB_CONNECT_URL="mysql://root:root_secret_password@localhost:3306/torrust_index_e2e_testing" \ cargo test \ - || exit 1 + || { ./contrib/dev-tools/container/e2e/mysql/e2e-env-down.sh; exit 1; } # Stop E2E testing environment ./contrib/dev-tools/container/e2e/mysql/e2e-env-down.sh || exit 1 - diff --git a/contrib/dev-tools/container/e2e/sqlite/run-e2e-tests.sh b/contrib/dev-tools/container/e2e/sqlite/run-e2e-tests.sh index 4ddc84cb..e504c257 100755 --- a/contrib/dev-tools/container/e2e/sqlite/run-e2e-tests.sh +++ b/contrib/dev-tools/container/e2e/sqlite/run-e2e-tests.sh @@ -43,7 +43,7 @@ TORRUST_INDEX_E2E_SHARED=true \ TORRUST_INDEX_E2E_PATH_CONFIG="./share/default/config/index.e2e.container.sqlite3.toml" \ TORRUST_INDEX_E2E_DB_CONNECT_URL="sqlite://./storage/index/lib/database/e2e_testing_sqlite3.db?mode=rwc" \ cargo test \ - || exit 1 + || { ./contrib/dev-tools/container/e2e/sqlite/e2e-env-down.sh; exit 1; } # Stop E2E testing environment ./contrib/dev-tools/container/e2e/sqlite/e2e-env-down.sh || exit 1