test(integration): ensure timeout handling

This commit is contained in:
2025-08-25 11:36:33 +02:00
parent a2940a84b3
commit 97377dea39
4 changed files with 95 additions and 0 deletions

View File

@ -110,6 +110,34 @@ teardown(){
assert_output --partial "0.1.0+1.20.0"
}
# bats test_tags=slow
@test "ignore timeout when not present in env" {
run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input --no-converge-checks
assert_success
# NOTE(d1): only recipe versions >= 0.3.5+1.21.0 have the TIMEOUT not set to
# a default in the compose.yml. so we force a rollback to that version
# specifically
run $ABRA app rollback "$TEST_APP_DOMAIN" "0.3.5+1.21.0" \
--no-input --no-converge-checks --debug --force
assert_success
refute_output --partial "timeout: set to"
}
# bats test_tags=slow
@test "use timeout when present in env" {
run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input --no-converge-checks
assert_success
run sed -i 's/#TIMEOUT=120/TIMEOUT=120/g' \
"$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
assert_success
run $ABRA app rollback "$TEST_APP_DOMAIN" --no-input --no-converge-checks --debug
assert_success
assert_output --partial "timeout: set to 120"
}
# bats test_tags=slow
@test "force rollback to previous version" {
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.1+1.20.2" --no-input --no-converge-checks