fix: pass force to the datastore command that owns it
The datastore destroys were written with dokku's global `--force`, which works only because dokku translates it into `DOKKU_APPS_FORCE_DELETE` and the plugin reads that environment variable back. The flag belongs to the subcommand, which declares it, so it is passed there instead. Only the datastore calls move. `network:destroy` and `storage:destroy` are dokku's own commands and keep dokku's own convention.
This commit is contained in:
@@ -179,12 +179,12 @@ teardown() {
|
|||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
run /bin/bash -c "dokku --force postgres:destroy $TEST_APP"
|
run /bin/bash -c "dokku postgres:destroy $TEST_APP --force"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
run /bin/bash -c "dokku --force redis:destroy $TEST_APP"
|
run /bin/bash -c "dokku redis:destroy $TEST_APP --force"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
|||||||
@@ -7,19 +7,19 @@ setup() {
|
|||||||
[[ -f "$DOKKU_ROOT/VHOST" ]] && cp -fp "$DOKKU_ROOT/VHOST" "$DOKKU_ROOT/VHOST.bak"
|
[[ -f "$DOKKU_ROOT/VHOST" ]] && cp -fp "$DOKKU_ROOT/VHOST" "$DOKKU_ROOT/VHOST.bak"
|
||||||
create_app
|
create_app
|
||||||
|
|
||||||
dokku --force postgres:destroy $TEST_APP 2>/dev/null || true
|
dokku postgres:destroy $TEST_APP --force 2>/dev/null || true
|
||||||
dokku --force redis:destroy $TEST_APP 2>/dev/null || true
|
dokku redis:destroy $TEST_APP --force 2>/dev/null || true
|
||||||
dokku --force postgres:destroy $TEST_APP-other 2>/dev/null || true
|
dokku postgres:destroy $TEST_APP-other --force 2>/dev/null || true
|
||||||
dokku --force redis:destroy $TEST_APP-other 2>/dev/null || true
|
dokku redis:destroy $TEST_APP-other --force 2>/dev/null || true
|
||||||
}
|
}
|
||||||
|
|
||||||
teardown() {
|
teardown() {
|
||||||
destroy_app
|
destroy_app
|
||||||
|
|
||||||
dokku --force postgres:destroy $TEST_APP 2>/dev/null || true
|
dokku postgres:destroy $TEST_APP --force 2>/dev/null || true
|
||||||
dokku --force redis:destroy $TEST_APP 2>/dev/null || true
|
dokku redis:destroy $TEST_APP --force 2>/dev/null || true
|
||||||
dokku --force postgres:destroy $TEST_APP-other 2>/dev/null || true
|
dokku postgres:destroy $TEST_APP-other --force 2>/dev/null || true
|
||||||
dokku --force redis:destroy $TEST_APP-other 2>/dev/null || true
|
dokku redis:destroy $TEST_APP-other --force 2>/dev/null || true
|
||||||
|
|
||||||
[[ -f "$DOKKU_ROOT/VHOST.bak" ]] && mv "$DOKKU_ROOT/VHOST.bak" "$DOKKU_ROOT/VHOST" && chown dokku:dokku "$DOKKU_ROOT/VHOST"
|
[[ -f "$DOKKU_ROOT/VHOST.bak" ]] && mv "$DOKKU_ROOT/VHOST.bak" "$DOKKU_ROOT/VHOST" && chown dokku:dokku "$DOKKU_ROOT/VHOST"
|
||||||
global_teardown
|
global_teardown
|
||||||
|
|||||||
Reference in New Issue
Block a user