Skip to content

Commit ae06170

Browse files
committed
fix: errors in scripts
- Wrong filepaths - Format scripts
1 parent 5f760cf commit ae06170

File tree

6 files changed

+20
-14
lines changed

6 files changed

+20
-14
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22

33
TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.mysql.toml) \
4-
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite.toml) \
4+
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \
55
docker compose down

contrib/dev-tools/container/e2e/mysql/run-e2e-tests.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3"
1717
# It's needed by some tests to generate and parse test torrent files.
1818
cargo install imdl || exit 1
1919

20-
# Install app (no docker) that will run the test suite against the E2E testing
20+
# Install app (no docker) that will run the test suite against the E2E testing
2121
# environment (in docker).
2222
cp .env.local .env || exit 1
2323

@@ -30,7 +30,7 @@ echo "Running E2E tests using MySQL ..."
3030
# Wait for conatiners to be healthy
3131
./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-mysql-1 10 3 || exit 1
3232
./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-tracker-1 10 3 || exit 1
33-
./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-index-1 10 3 || exit 1
33+
./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-index-1 10 3 || exit 1
3434

3535
# Just to make sure that everything is up and running
3636
docker ps
@@ -42,8 +42,11 @@ docker ps
4242
TORRUST_INDEX_E2E_SHARED=true \
4343
TORRUST_INDEX_E2E_PATH_CONFIG="./share/default/config/index.e2e.container.mysql.toml" \
4444
TORRUST_INDEX_E2E_DB_CONNECT_URL="mysql://root:root_secret_password@localhost:3306/torrust_index_e2e_testing" \
45-
cargo test \
46-
|| { ./contrib/dev-tools/container/e2e/mysql/e2e-env-down.sh; exit 1; }
45+
cargo test ||
46+
{
47+
./contrib/dev-tools/container/e2e/mysql/e2e-env-down.sh
48+
exit 1
49+
}
4750

4851
# Stop E2E testing environment
4952
./contrib/dev-tools/container/e2e/mysql/e2e-env-down.sh || exit 1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22

33
TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \
4-
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \
4+
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \
55
docker compose down

contrib/dev-tools/container/e2e/sqlite/e2e-env-up.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ USER_ID=${USER_ID:-1000} \
1313
TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3" \
1414
TORRUST_TRACKER_CONFIG_OVERRIDE_DB_DRIVER="Sqlite3" \
1515
TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN="MyAccessToken" \
16-
docker compose up --detach --pull always --remove-orphans
16+
docker compose up --detach --pull always --remove-orphans

contrib/dev-tools/container/e2e/sqlite/run-e2e-tests.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3"
1717
# It's needed by some tests to generate and parse test torrent files.
1818
cargo install imdl || exit 1
1919

20-
# Install app (no docker) that will run the test suite against the E2E testing
20+
# Install app (no docker) that will run the test suite against the E2E testing
2121
# environment (in docker).
2222
cp .env.local .env || exit 1
2323
./contrib/dev-tools/container/e2e/sqlite/install.sh || exit 1
@@ -31,7 +31,7 @@ echo "Running E2E tests using SQLite ..."
3131
# Wait for conatiners to be healthy
3232
./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-mysql-1 10 3 || exit 1
3333
./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-tracker-1 10 3 || exit 1
34-
./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-index-1 10 3 || exit 1
34+
./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-index-1 10 3 || exit 1
3535

3636
# Just to make sure that everything is up and running
3737
docker ps
@@ -40,8 +40,11 @@ docker ps
4040
TORRUST_INDEX_E2E_SHARED=true \
4141
TORRUST_INDEX_E2E_PATH_CONFIG="./share/default/config/index.e2e.container.sqlite3.toml" \
4242
TORRUST_INDEX_E2E_DB_CONNECT_URL="sqlite://./storage/index/lib/database/e2e_testing_sqlite3.db?mode=rwc" \
43-
cargo test \
44-
|| { ./contrib/dev-tools/container/e2e/sqlite/e2e-env-down.sh; exit 1; }
43+
cargo test ||
44+
{
45+
./contrib/dev-tools/container/e2e/sqlite/e2e-env-down.sh
46+
exit 1
47+
}
4548

4649
# Stop E2E testing environment
4750
./contrib/dev-tools/container/e2e/sqlite/e2e-env-down.sh || exit 1

contrib/dev-tools/init/install-local.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Generate the Index sqlite database directory and file if it does not exist
66
mkdir -p ./storage/index/lib/database
77

8-
if ! [ -f "./storage/index/lib/database/sqlite3.db.db" ]; then
9-
echo "Creating index database 'sqlite3.db.db'"
10-
sqlite3 "./storage/index/lib/database/sqlite3.db.db" "VACUUM;"
8+
if ! [ -f "./storage/index/lib/database/sqlite3.db" ]; then
9+
echo "Creating index database 'sqlite3.db'"
10+
sqlite3 "./storage/index/lib/database/sqlite3.db" "VACUUM;"
1111
fi

0 commit comments

Comments
 (0)