diff --git a/contrib/dev-tools/container/e2e/mysql/e2e-env-down.sh b/contrib/dev-tools/container/e2e/mysql/e2e-env-down.sh index a867b233..54123056 100755 --- a/contrib/dev-tools/container/e2e/mysql/e2e-env-down.sh +++ b/contrib/dev-tools/container/e2e/mysql/e2e-env-down.sh @@ -1,5 +1,5 @@ #!/bin/bash TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.mysql.toml) \ - TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite.toml) \ +TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \ docker compose down 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 476d2a04..cbbc0530 100755 --- a/contrib/dev-tools/container/e2e/mysql/run-e2e-tests.sh +++ b/contrib/dev-tools/container/e2e/mysql/run-e2e-tests.sh @@ -17,7 +17,7 @@ export TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3" # It's needed by some tests to generate and parse test torrent files. cargo install imdl || exit 1 -# Install app (no docker) that will run the test suite against the E2E testing +# Install app (no docker) that will run the test suite against the E2E testing # environment (in docker). cp .env.local .env || exit 1 @@ -30,7 +30,7 @@ echo "Running E2E tests using MySQL ..." # Wait for conatiners to be healthy ./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-mysql-1 10 3 || exit 1 ./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-tracker-1 10 3 || exit 1 -./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-index-1 10 3 || exit 1 +./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-index-1 10 3 || exit 1 # Just to make sure that everything is up and running docker ps @@ -42,8 +42,11 @@ docker ps 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 \ - || { ./contrib/dev-tools/container/e2e/mysql/e2e-env-down.sh; exit 1; } + cargo test || + { + ./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/e2e-env-down.sh b/contrib/dev-tools/container/e2e/sqlite/e2e-env-down.sh index be61fa4d..3dfc14e3 100755 --- a/contrib/dev-tools/container/e2e/sqlite/e2e-env-down.sh +++ b/contrib/dev-tools/container/e2e/sqlite/e2e-env-down.sh @@ -1,5 +1,5 @@ #!/bin/bash TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \ - TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \ +TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \ docker compose down diff --git a/contrib/dev-tools/container/e2e/sqlite/e2e-env-up.sh b/contrib/dev-tools/container/e2e/sqlite/e2e-env-up.sh index abd6a6a6..e9a424f5 100755 --- a/contrib/dev-tools/container/e2e/sqlite/e2e-env-up.sh +++ b/contrib/dev-tools/container/e2e/sqlite/e2e-env-up.sh @@ -13,4 +13,4 @@ USER_ID=${USER_ID:-1000} \ TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3" \ TORRUST_TRACKER_CONFIG_OVERRIDE_DB_DRIVER="Sqlite3" \ TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN="MyAccessToken" \ - docker compose up --detach --pull always --remove-orphans + docker compose up --detach --pull always --remove-orphans 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 af22e085..5842723c 100755 --- a/contrib/dev-tools/container/e2e/sqlite/run-e2e-tests.sh +++ b/contrib/dev-tools/container/e2e/sqlite/run-e2e-tests.sh @@ -17,7 +17,7 @@ export TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3" # It's needed by some tests to generate and parse test torrent files. cargo install imdl || exit 1 -# Install app (no docker) that will run the test suite against the E2E testing +# Install app (no docker) that will run the test suite against the E2E testing # environment (in docker). cp .env.local .env || exit 1 ./contrib/dev-tools/container/e2e/sqlite/install.sh || exit 1 @@ -31,7 +31,7 @@ echo "Running E2E tests using SQLite ..." # Wait for conatiners to be healthy ./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-mysql-1 10 3 || exit 1 ./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-tracker-1 10 3 || exit 1 -./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-index-1 10 3 || exit 1 +./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-index-1 10 3 || exit 1 # Just to make sure that everything is up and running docker ps @@ -40,8 +40,11 @@ docker ps 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 \ - || { ./contrib/dev-tools/container/e2e/sqlite/e2e-env-down.sh; exit 1; } + cargo test || + { + ./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 diff --git a/contrib/dev-tools/init/install-local.sh b/contrib/dev-tools/init/install-local.sh index e7b76d49..caeb27ef 100644 --- a/contrib/dev-tools/init/install-local.sh +++ b/contrib/dev-tools/init/install-local.sh @@ -5,7 +5,7 @@ # Generate the Index sqlite database directory and file if it does not exist mkdir -p ./storage/index/lib/database -if ! [ -f "./storage/index/lib/database/sqlite3.db.db" ]; then - echo "Creating index database 'sqlite3.db.db'" - sqlite3 "./storage/index/lib/database/sqlite3.db.db" "VACUUM;" +if ! [ -f "./storage/index/lib/database/sqlite3.db" ]; then + echo "Creating index database 'sqlite3.db'" + sqlite3 "./storage/index/lib/database/sqlite3.db" "VACUUM;" fi