Skip to content

Commit 49980a1

Browse files
committed
Merge #409: Wait for Tracker container to be healthy
e00406e ci: [#408] wait for Tracker container to be healthy (Jose Celano) Pull request description: Instead of just waiting 20 seconds. Now the Tracker container has `HEALTHCHECK` instruction. See: torrust/torrust-tracker#508 ACKs for top commit: josecelano: ACK e00406e Tree-SHA512: af1b5c86edaee93868f9b830941532c27077ce913695d3279bf11c7e0bb89cbd7832738daf27ff0a7a7fad0e2bd004c1721fa7ac105ff42c15040c53a9979185
2 parents 563020a + e00406e commit 49980a1

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

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

+1-3
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ echo "Running E2E tests using MySQL ..."
2929

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
32-
# todo: implement healthchecks for the tracker and wait until it's healthy
33-
#./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-tracker-1 10 3
32+
./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-tracker-1 10 3 || exit 1
3433
./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-index-1 10 3 || exit 1
35-
sleep 20s
3634

3735
# Just to make sure that everything is up and running
3836
docker ps

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

+1-3
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ echo "Running E2E tests using SQLite ..."
3030

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
33-
# todo: implement healthchecks for the tracker and wait until it's healthy
34-
#./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-tracker-1 10 3
33+
./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-tracker-1 10 3 || exit 1
3534
./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-index-1 10 3 || exit 1
36-
sleep 20s
3735

3836
# Just to make sure that everything is up and running
3937
docker ps

share/default/config/tracker.container.mysql.toml

+3
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"
3636

3737
[http_api.access_tokens]
3838
admin = "MyAccessToken"
39+
40+
[health_check_api]
41+
bind_address = "127.0.0.1:1313"

share/default/config/tracker.container.sqlite3.toml

+3
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"
3636

3737
[http_api.access_tokens]
3838
admin = "MyAccessToken"
39+
40+
[health_check_api]
41+
bind_address = "127.0.0.1:1313"

share/default/config/tracker.e2e.container.sqlite3.toml

+4
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,7 @@ ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"
3636

3737
[http_api.access_tokens]
3838
admin = "MyAccessToken"
39+
40+
[health_check_api]
41+
bind_address = "127.0.0.1:1313"
42+

0 commit comments

Comments
 (0)