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,7 @@ setup(){
}
teardown(){
# https://github.com/bats-core/bats-core/issues/383#issuecomment-738628888
if [[ -z "${BATS_TEST_COMPLETED}" ]]; then
_undeploy_app
fi
_undeploy_app
}
@test "ls validate app argument" {
@ -47,8 +44,6 @@ teardown(){
run $ABRA app volume ls "$TEST_APP_DOMAIN"
assert_success
assert_output --partial 'test-volume'
_undeploy_app
}
@test "rm validate app argument" {
@ -68,14 +63,13 @@ teardown(){
run $ABRA app volume rm "$TEST_APP_DOMAIN" --force
assert_failure
assert_output --partial 'is still deployed'
_undeploy_app
}
# bats test_tags=slow
@test "remove volumes" {
_deploy_app
sleep 3 # NOTE(d1): hack to avoid "network not found"
_deploy_app
_undeploy_app
run $ABRA app volume rm "$TEST_APP_DOMAIN" --force
@ -85,8 +79,9 @@ teardown(){
# bats test_tags=slow
@test "remove no volumes" {
_deploy_app
sleep 3 # NOTE(d1): hack to avoid "network not found"
_deploy_app
_undeploy_app
run $ABRA app volume rm "$TEST_APP_DOMAIN" --force