test: less fragile integration suite [ci skip]

See coop-cloud/organising#584
See coop-cloud/organising#595
This commit is contained in:
2024-06-22 16:40:07 +02:00
parent a9ce2106c6
commit 2014cd6622
39 changed files with 249 additions and 425 deletions

View File

@ -18,10 +18,8 @@ setup(){
}
teardown(){
# https://github.com/bats-core/bats-core/issues/383#issuecomment-738628888
if [[ -z "${BATS_TEST_COMPLETED}" ]]; then
_undeploy_app
fi
_undeploy_app
_reset_recipe
}
@test "validate app argument" {
@ -43,8 +41,6 @@ teardown(){
run $ABRA app upgrade "$TEST_APP_DOMAIN" "0.1.0+1.20.0" --no-input
assert_failure
assert_output --partial 'is not an upgrade'
_undeploy_app
}
@test "bail out if specific version and chaos" {
@ -65,10 +61,6 @@ teardown(){
--no-input --no-converge-checks --chaos
assert_failure
assert_output --partial 'failed lint checks'
_checkout_recipe
_undeploy_app
}
# bats test_tags=slow
@ -78,8 +70,6 @@ teardown(){
run $ABRA app upgrade "$TEST_APP_DOMAIN" --no-input --no-converge-checks
assert_success
assert_output --partial "you're on latest"
_undeploy_app
}
# bats test_tags=slow
@ -108,9 +98,6 @@ teardown(){
run $ABRA app undeploy "$appDomain" --no-input
assert_success
# NOTE(d1): to let the stack come down before nuking volumes
sleep 3
run $ABRA app volume remove "$appDomain" --no-input
assert_success
@ -128,8 +115,6 @@ teardown(){
run $ABRA app upgrade "$TEST_APP_DOMAIN" "0.2.0+1.21.0" --no-input --no-converge-checks
assert_success
assert_output --partial '0.2.0+1.21.0'
_undeploy_app
}
# bats test_tags=slow
@ -143,8 +128,6 @@ teardown(){
run $ABRA app upgrade "$TEST_APP_DOMAIN" --no-input --no-converge-checks
assert_success
assert_output --partial "$latestRelease"
_undeploy_app
}
# bats test_tags=slow
@ -160,8 +143,6 @@ teardown(){
assert_output --partial "$latestRelease"
assert_output --partial 'release notes baz' # 0.2.0+1.21.0
refute_output --partial 'release notes bar' # 0.1.1+1.20.2
_undeploy_app
}
# bats test_tags=slow
@ -175,8 +156,6 @@ teardown(){
assert_output --partial '0.1.1+1.20.2'
assert_output --partial 'release notes bar' # 0.1.1+1.20.2
refute_output --partial 'release notes baz' # 0.2.0+1.21.0
_undeploy_app
}
# bats test_tags=slow
@ -192,8 +171,6 @@ teardown(){
assert_output --partial "$latestRelease"
assert_output --partial 'release notes bar' # 0.1.1+1.20.2
assert_output --partial 'release notes baz' # 0.2.0+1.21.0
_undeploy_app
}
# bats test_tags=slow
@ -207,6 +184,4 @@ teardown(){
assert_output --partial '0.2.0+1.21.0'
assert_output --partial 'release notes bar' # 0.1.1+1.20.2
assert_output --partial 'release notes baz' # 0.2.0+1.21.0
_undeploy_app
}