Skip to content

Commit

Permalink
related vs pre_reqs
Browse files Browse the repository at this point in the history
  • Loading branch information
SaswatPadhi committed Jan 22, 2025
1 parent d8e771d commit ac64bc8
Show file tree
Hide file tree
Showing 36 changed files with 102 additions and 97 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/compose-test_airdcpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
./comp up --skip-related --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
Expand All @@ -41,7 +41,7 @@ jobs:
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
if ! ./comp status --skip-related ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compose-test_gitea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
./comp up --skip-related --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
Expand All @@ -39,7 +39,7 @@ jobs:
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
if ! ./comp status --skip-related ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compose-test_hass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
./comp up --skip-related --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
Expand All @@ -38,7 +38,7 @@ jobs:
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
if ! ./comp status --skip-related ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compose-test_indexarr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
./comp up --skip-related --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
Expand All @@ -41,7 +41,7 @@ jobs:
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
if ! ./comp status --skip-related ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compose-test_monitarr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
./comp up --skip-related --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
Expand All @@ -39,7 +39,7 @@ jobs:
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
if ! ./comp status --skip-related ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compose-test_navidrome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
./comp up --skip-related --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
Expand All @@ -39,7 +39,7 @@ jobs:
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
if ! ./comp status --skip-related ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compose-test_netbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
./comp up --skip-related --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
Expand All @@ -39,7 +39,7 @@ jobs:
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
if ! ./comp status --skip-related ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compose-test_nextcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
./comp up --skip-related --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
Expand All @@ -39,7 +39,7 @@ jobs:
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
if ! ./comp status --skip-related ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compose-test_ntfy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
./comp up --skip-related --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
Expand All @@ -39,7 +39,7 @@ jobs:
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
if ! ./comp status --skip-related ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compose-test_pihole.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
./comp up --skip-related --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
Expand All @@ -39,7 +39,7 @@ jobs:
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
if ! ./comp status --skip-related ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compose-test_qbittorrent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
./comp up --skip-related --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
Expand All @@ -41,7 +41,7 @@ jobs:
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
if ! ./comp status --skip-related ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compose-test_tang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
./comp up --skip-related --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
Expand All @@ -39,7 +39,7 @@ jobs:
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
if ! ./comp status --skip-related ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compose-test_teslamate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
./comp up --skip-related --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
Expand All @@ -39,7 +39,7 @@ jobs:
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
if ! ./comp status --skip-related ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compose-test_tiny_httpd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
./comp up --skip-related --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
Expand All @@ -39,7 +39,7 @@ jobs:
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
if ! ./comp status --skip-related ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compose-test_uptime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
./comp up --skip-related --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
Expand All @@ -39,7 +39,7 @@ jobs:
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
if ! ./comp status --skip-related ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/config/docker-compose.vpn-proxy-expose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
networks:
proxy:
external: true

services:
vpn:
networks:
- proxy
20 changes: 10 additions & 10 deletions _scripts/test_comp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \
exit_on_failure

SETUP "status reports $TARGET_COMP_1_DISPLAY is unhealthy" \
"status -P $TARGET_COMP_1"
"status -R $TARGET_COMP_1"
CHECK $'grep -qs "Executing status on $TARGET_COMP_1" "$COMP_OUT_PATH"' \
"Info at beginning of execution"
CHECK $'grep -qs "Unhealthy service:" "$COMP_ERR_PATH"' \
Expand All @@ -147,7 +147,7 @@ fragments:
EOF

SETUP "bad fragment value in meta breaks $TARGET_COMP_1_DISPLAY" \
"overrides -P $TARGET_COMP_1"
"overrides -R $TARGET_COMP_1"
CHECK $'grep -qs "Invalid value \'nyet\' for \'DEVICES\' in $TARGET_COMP_1/meta.override.yml" "$COMP_ERR_PATH"' \
"Configuration error reported for $TARGET_COMP_1_DISPLAY" \
exit_on_failure
Expand All @@ -161,7 +161,7 @@ fragments:
EOF

SETUP "querying the overrides list for $TARGET_COMP_1_DISPLAY otherwise passes" \
"overrides -P $TARGET_COMP_1"
"overrides -R $TARGET_COMP_1"
CHECK $'grep -qs "Executing overrides on $TARGET_COMP_1" "$COMP_OUT_PATH"' \
"Info at beginning of execution"
CHECK $'grep -qs "\[L\] $TARGET_COMP_1/meta.override.yml" "$COMP_OUT_PATH"' \
Expand All @@ -171,7 +171,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \
exit_on_failure

SETUP "$TARGET_COMP_1_DISPLAY can be started without prerequisites" \
"up -P $TARGET_COMP_1"
"up -R $TARGET_COMP_1"
CHECK $'grep -qs "Executing up on $TARGET_COMP_1" "$COMP_OUT_PATH"' \
"Info at beginning of execution"
CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \
Expand All @@ -192,7 +192,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq $EXIT_CODE_SIMPLE_VERB_FAILURE ]' \
_WAIT 30s "$TARGET_COMP_1_DISPLAY to start up and emit health status"

SETUP "that status reports $TARGET_COMP_1_DISPLAY is healthy" \
"status -P $TARGET_COMP_1"
"status -R $TARGET_COMP_1"
CHECK $'grep -qs "Executing status on $TARGET_COMP_1" "$COMP_OUT_PATH"' \
"Info at beginning of execution"
CHECK $'grep -qs "$TARGET_COMP_1 is healthy" "$COMP_OUT_PATH"' \
Expand Down Expand Up @@ -240,7 +240,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \
_INIT tiny_httpd

SETUP "$TARGET_COMP_1_DISPLAY & $TARGET_COMP_2_DISPLAY may be started with different fragments" \
"up -P $TARGET_COMP_1 $TARGET_COMP_2"
"up -R $TARGET_COMP_1 $TARGET_COMP_2"
CHECK $'grep -lPqsz "Executing up on $TARGET_COMP_1.*\\n.*Disabled fragments: DEVICES \(conf\)" "$COMP_OUT_PATH"' \
"Info with disabled fragments at beginning of $TARGET_COMP_1_DISPLAY execution" \
exit_on_failure
Expand All @@ -257,7 +257,7 @@ fragments:
EOF

SETUP "a bad fragment breaks $TARGET_COMP_1_DISPLAY but $TARGET_COMP_2_DISPLAY still works without fragments" \
"down -P $TARGET_COMP_1 $TARGET_COMP_2"
"down -R $TARGET_COMP_1 $TARGET_COMP_2"
CHECK $'grep -qs "Invalid value \'nyet\' for \'DEVICES\' in $TARGET_COMP_1/meta.override.yml" "$COMP_ERR_PATH"' \
"Configuration error reported for $TARGET_COMP_1_DISPLAY" \
exit_on_failure
Expand All @@ -272,7 +272,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq $EXIT_CODE_FRAGMENTS_ERROR ]' \
exit_on_failure

SETUP "$TARGET_COMP_1_DISPLAY & $TARGET_COMP_2_DISPLAY can both be stopped when ignoring overrides" \
"down -P -O $TARGET_COMP_1 $TARGET_COMP_2"
"down -R -O $TARGET_COMP_1 $TARGET_COMP_2"
CHECK $'grep -Pqs "Container $TARGET_COMP_1.* Removed" "$COMP_ERR_PATH"' \
"Stopped $TARGET_COMP_1_DISPLAY successfully" \
exit_on_failure
Expand All @@ -286,7 +286,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \
_INIT tang _.test.very_ .bad.name_

SETUP "starting $TARGET_COMP_3_DISPLAY works" \
"up -P $TARGET_COMP_3"
"up -R $TARGET_COMP_3"
CHECK $'grep -qs "drops all \'\.\' from project name" "$COMP_ERR_PATH"' \
"Name validation error due to '.'"
CHECK $'grep -qs "drops leading \'_\' from project name" "$COMP_ERR_PATH"' \
Expand All @@ -298,7 +298,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \
_WAIT 30s "$TARGET_COMP_3_DISPLAY to start up and emit health status"

SETUP "status reports $TARGET_COMP_3_DISPLAY is healthy" \
"status -P $TARGET_COMP_3"
"status -R $TARGET_COMP_3"
CHECK $'grep -qs "drops all \'\.\' from project name" "$COMP_ERR_PATH"' \
"Name validation error due to '.'"
CHECK $'grep -qs "drops leading \'_\' from project name" "$COMP_ERR_PATH"' \
Expand Down
2 changes: 1 addition & 1 deletion airdcpp/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ messages:
${_THIS_COMPOSITION_} may now be accessed on
${_LINK_FONT_}https://${SERVER_WAN_FQDN}:${SERVER_WAN_HTTPS_PORT}/${AIRDCPP_BASE_PATH}/${_RESET_FONT_}
pre_reqs:
related:
- traefik
Loading

0 comments on commit ac64bc8

Please sign in to comment.