Skip to content

Commit

Permalink
Merge #409: Wait for Tracker container to be healthy
Browse files Browse the repository at this point in the history
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
  • Loading branch information
josecelano committed Nov 27, 2023
2 parents 563020a + e00406e commit 49980a1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
4 changes: 1 addition & 3 deletions contrib/dev-tools/container/e2e/mysql/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ 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
# todo: implement healthchecks for the tracker and wait until it's healthy
#./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-tracker-1 10 3
./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
sleep 20s

# Just to make sure that everything is up and running
docker ps
Expand Down
4 changes: 1 addition & 3 deletions contrib/dev-tools/container/e2e/sqlite/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ 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
# todo: implement healthchecks for the tracker and wait until it's healthy
#./contrib/dev-tools/container/functions/wait_for_container_to_be_healthy.sh torrust-tracker-1 10 3
./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
sleep 20s

# Just to make sure that everything is up and running
docker ps
Expand Down
3 changes: 3 additions & 0 deletions share/default/config/tracker.container.mysql.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"

[http_api.access_tokens]
admin = "MyAccessToken"

[health_check_api]
bind_address = "127.0.0.1:1313"
3 changes: 3 additions & 0 deletions share/default/config/tracker.container.sqlite3.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"

[http_api.access_tokens]
admin = "MyAccessToken"

[health_check_api]
bind_address = "127.0.0.1:1313"
4 changes: 4 additions & 0 deletions share/default/config/tracker.e2e.container.sqlite3.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"

[http_api.access_tokens]
admin = "MyAccessToken"

[health_check_api]
bind_address = "127.0.0.1:1313"

0 comments on commit 49980a1

Please sign in to comment.