forked from toolshed/abra
@ -63,20 +63,24 @@ teardown(){
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "remove volumes" {
|
||||
sleep 3 # NOTE(d1): hack to avoid "network not found"
|
||||
|
||||
_deploy_app
|
||||
_undeploy_app
|
||||
|
||||
run $ABRA app volume ls "$TEST_APP_DOMAIN"
|
||||
assert_success
|
||||
assert_output --partial 'test-volume'
|
||||
|
||||
run $ABRA app volume rm "$TEST_APP_DOMAIN" --force
|
||||
assert_success
|
||||
assert_output --partial 'volumes removed successfully'
|
||||
|
||||
run $ABRA app volume ls "$TEST_APP_DOMAIN"
|
||||
assert_success
|
||||
assert_output --partial 'no volumes created'
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "remove no volumes" {
|
||||
sleep 3 # NOTE(d1): hack to avoid "network not found"
|
||||
|
||||
_deploy_app
|
||||
_undeploy_app
|
||||
|
||||
@ -88,3 +92,59 @@ teardown(){
|
||||
assert_success
|
||||
assert_output --partial 'no volumes removed'
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "remove single volume" {
|
||||
_deploy_app
|
||||
_undeploy_app
|
||||
|
||||
run $ABRA app volume ls "$TEST_APP_DOMAIN"
|
||||
assert_success
|
||||
assert_output --partial 'test-volume'
|
||||
assert_output --partial 'test-volume-two'
|
||||
|
||||
run $ABRA app volume rm "$TEST_APP_DOMAIN" test-volume-two --force
|
||||
assert_success
|
||||
assert_output --partial 'test-volume-two removed successfully'
|
||||
|
||||
run $ABRA app volume ls "$TEST_APP_DOMAIN"
|
||||
assert_success
|
||||
assert_output --partial 'test-volume'
|
||||
refute_output --partial 'test-volume-two'
|
||||
|
||||
run $ABRA app volume rm "$TEST_APP_DOMAIN" --force
|
||||
assert_success
|
||||
assert_output --partial 'volumes removed successfully'
|
||||
|
||||
run $ABRA app volume ls "$TEST_APP_DOMAIN"
|
||||
assert_success
|
||||
assert_output --partial 'no volumes created'
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "remove single volume incorrect name" {
|
||||
_deploy_app
|
||||
_undeploy_app
|
||||
|
||||
run $ABRA app volume rm "$TEST_APP_DOMAIN" DOESNTEXIST --force
|
||||
assert_failure
|
||||
assert_output --partial 'no volume with name'
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "remove single volume doesn't delete similar name" {
|
||||
_deploy_app
|
||||
_undeploy_app
|
||||
|
||||
run $ABRA app volume ls "$TEST_APP_DOMAIN"
|
||||
assert_success
|
||||
assert_output --partial 'test-volume-two'
|
||||
|
||||
run $ABRA app volume rm "$TEST_APP_DOMAIN" test-volume --force
|
||||
assert_success
|
||||
assert_output --partial 'test-volume removed successfully'
|
||||
|
||||
run $ABRA app volume ls "$TEST_APP_DOMAIN"
|
||||
assert_success
|
||||
assert_output --partial 'test-volume-two'
|
||||
}
|
||||
|
Reference in New Issue
Block a user