forked from toolshed/abra
test: less fragile integration suite [ci skip]
See coop-cloud/organising#584 See coop-cloud/organising#595
This commit is contained in:
@ -18,10 +18,11 @@ setup(){
|
||||
}
|
||||
|
||||
teardown(){
|
||||
# https://github.com/bats-core/bats-core/issues/383#issuecomment-738628888
|
||||
if [[ -z "${BATS_TEST_COMPLETED}" ]]; then
|
||||
_undeploy_app
|
||||
if [[ ! -f "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env" ]]; then
|
||||
_new_app
|
||||
fi
|
||||
|
||||
_undeploy_app
|
||||
}
|
||||
|
||||
@test "validate app argument" {
|
||||
@ -40,8 +41,6 @@ teardown(){
|
||||
|
||||
run $ABRA app rm "$TEST_APP_DOMAIN" --no-input
|
||||
refute_output --partial 'ALERTA'
|
||||
|
||||
_new_app
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@ -51,8 +50,6 @@ teardown(){
|
||||
run $ABRA app rm "$TEST_APP_DOMAIN" --no-input
|
||||
assert_failure
|
||||
assert_output --partial 'is still deployed'
|
||||
|
||||
_undeploy_app
|
||||
}
|
||||
|
||||
@test "detect no secrets to remove" {
|
||||
@ -71,8 +68,6 @@ teardown(){
|
||||
run $ABRA app rm "$TEST_APP_DOMAIN" --no-input
|
||||
assert_success
|
||||
assert_output --partial 'no secrets to remove'
|
||||
|
||||
_new_app
|
||||
}
|
||||
|
||||
@test "remove secrets" {
|
||||
@ -90,8 +85,6 @@ teardown(){
|
||||
|
||||
sanitisedDomainName="${TEST_APP_DOMAIN//./_}"
|
||||
assert_output --partial "$sanitisedDomainName_test_pass_one_v1 removed"
|
||||
|
||||
_new_app
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@ -115,8 +108,6 @@ teardown(){
|
||||
run $ABRA app rm "$TEST_APP_DOMAIN" --no-input
|
||||
assert_success
|
||||
assert_output --partial 'no volumes to remove'
|
||||
|
||||
_new_app
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@ -133,8 +124,6 @@ teardown(){
|
||||
assert_success
|
||||
assert_output --partial 'test-volume'
|
||||
assert_output --partial 'removed'
|
||||
|
||||
_new_app
|
||||
}
|
||||
|
||||
@test "remove .env file" {
|
||||
@ -144,6 +133,4 @@ teardown(){
|
||||
assert_success
|
||||
|
||||
assert_not_exists "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
|
||||
|
||||
_new_app
|
||||
}
|
||||
|
Reference in New Issue
Block a user