feat: remove old app configs
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
See #577
This commit is contained in:
@ -124,6 +124,33 @@ teardown(){
|
||||
assert_output --partial 'removed'
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "detect no configs to remove" {
|
||||
_deploy_app
|
||||
_undeploy_app
|
||||
|
||||
run $ABRA app rm "$TEST_APP_DOMAIN" --no-input
|
||||
assert_success
|
||||
assert_output --partial 'no configs to remove'
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "remove old app configs" {
|
||||
_deploy_app
|
||||
_undeploy_app
|
||||
|
||||
sanitisedDomainName="${TEST_APP_DOMAIN//./_}"
|
||||
run docker config create "${sanitisedDomainName}_test_conf_v99" "$ABRA_DIR/recipes/abra-test-recipe/abra.sh"
|
||||
assert_success
|
||||
|
||||
assert bash -c "docker config ls | grep -q test_conf_v99"
|
||||
|
||||
run $ABRA app rm "$TEST_APP_DOMAIN" --no-input
|
||||
assert_success
|
||||
|
||||
refute bash -c "docker config ls | grep -q test_conf_v99"
|
||||
}
|
||||
|
||||
@test "remove .env file" {
|
||||
assert_exists "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
|
||||
|
||||
|
Reference in New Issue
Block a user