test(integration): ensure timeout handling
This commit is contained in:
@ -444,6 +444,24 @@ teardown(){
|
||||
assert_output --partial "$latestRelease"
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "ignore timeout when not present in env" {
|
||||
run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input --no-converge-checks --debug
|
||||
assert_success
|
||||
refute_output --partial "timeout: set to"
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "use timeout when present in env" {
|
||||
run sed -i 's/#TIMEOUT=120/TIMEOUT=120/g' \
|
||||
"$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
|
||||
assert_success
|
||||
|
||||
run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input --no-converge-checks --debug
|
||||
assert_success
|
||||
assert_output --partial "timeout: set to 120"
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "no chaos version label if no chaos" {
|
||||
_deploy_app
|
||||
|
@ -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
|
||||
|
@ -116,6 +116,28 @@ teardown(){
|
||||
assert_success
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "ignore timeout when not present in env" {
|
||||
_deploy_app
|
||||
|
||||
run $ABRA app undeploy "$TEST_APP_DOMAIN" --no-input --debug
|
||||
assert_success
|
||||
refute_output --partial "timeout: set to"
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "use timeout when present in env" {
|
||||
_deploy_app
|
||||
|
||||
run sed -i 's/#TIMEOUT=120/TIMEOUT=120/g' \
|
||||
"$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
|
||||
assert_success
|
||||
|
||||
run $ABRA app undeploy "$TEST_APP_DOMAIN" --no-input --debug
|
||||
assert_success
|
||||
assert_output --partial "timeout: set to 120"
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "undeploy chaos deployment" {
|
||||
run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input --chaos
|
||||
|
@ -152,6 +152,33 @@ teardown(){
|
||||
assert_output --partial "$(_latest_release)"
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "ignore timeout when not present in env" {
|
||||
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.0+1.20.0" --no-input --no-converge-checks
|
||||
assert_success
|
||||
assert_output --partial '0.1.0+1.20.0'
|
||||
|
||||
run $ABRA app upgrade "$TEST_APP_DOMAIN" --no-input --no-converge-checks --debug
|
||||
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" "0.1.0+1.20.0" --no-input --no-converge-checks
|
||||
assert_success
|
||||
assert_output --partial '0.1.0+1.20.0'
|
||||
|
||||
run sed -i 's/#TIMEOUT=120/TIMEOUT=120/g' \
|
||||
"$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
|
||||
assert_success
|
||||
|
||||
run $ABRA app upgrade "$TEST_APP_DOMAIN" --no-input --no-converge-checks --debug
|
||||
assert_success
|
||||
assert_output --partial "timeout: set to 120"
|
||||
}
|
||||
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "show single release note" {
|
||||
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.1+1.20.2" --no-input --no-converge-checks
|
||||
|
Reference in New Issue
Block a user