Compare commits

..

1 Commits

Author SHA1 Message Date
861cf27af9 WIP: feat: add volume arg to volume rm
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
See #574
2025-08-13 13:41:38 +02:00
2 changed files with 6 additions and 27 deletions

View File

@ -71,7 +71,7 @@ var AppVolumeListCommand = &cobra.Command{
}
var AppVolumeRemoveCommand = &cobra.Command{
Use: "remove <domain> [flags]",
Use: "remove <domain> [volume] [flags]",
Short: "Remove volume(s) associated with an app",
Long: `Remove volumes associated with an app.
@ -83,6 +83,11 @@ you to make a seclection. Use the "?" key to see more help on navigating this
interface.
Passing "--force/-f" will select all volumes for removal. Be careful.`,
Example: ` # delete volumes interactively
abra app volume rm 1312.net
# delete specific volume
abra app volume rm 1312.net my_volume`,
Aliases: []string{"rm"},
Args: cobra.MinimumNArgs(1),
ValidArgsFunction: func(

View File

@ -8,10 +8,6 @@ setup_file(){
}
teardown_file(){
if [[ ! -f "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env" ]]; then
_new_app
fi
_undeploy_app
_rm_app
_rm_server
@ -23,10 +19,6 @@ setup(){
}
teardown(){
if [[ ! -f "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env" ]]; then
_new_app
fi
_reset_recipe
_undeploy_app
}
@ -145,21 +137,3 @@ teardown(){
assert_success
assert_not_exists "$ABRA_DIR/servers/foo.com"
}
# bats test_tags=slow
@test "list does not fail if missing .env" {
_deploy_app
run $ABRA app ls --status
assert_success
run rm -rf "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
assert_success
assert_not_exists "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
output=$("$ABRA" app ls --server "$TEST_SERVER" --status --machine)
run diff \
<(jq -S "." <(echo "$output")) \
<(jq -S "." <(echo '{}'))
assert_success
}