diff --git a/plugins/config/Makefile b/plugins/config/Makefile index afca09a61..8fd01f747 100644 --- a/plugins/config/Makefile +++ b/plugins/config/Makefile @@ -1,4 +1,4 @@ -SUBCOMMANDS = subcommands/bundle subcommands/export subcommands/get subcommands/keys subcommands/show subcommands/set subcommands/unset +SUBCOMMANDS = subcommands/bundle subcommands/clear subcommands/export subcommands/get subcommands/keys subcommands/show subcommands/set subcommands/unset TRIGGERS = triggers/config-get triggers/config-get-global BUILD = commands subcommands triggers PLUGIN_NAME = config diff --git a/tests/unit/config.bats b/tests/unit/config.bats index c0221ab80..376d577ff 100644 --- a/tests/unit/config.bats +++ b/tests/unit/config.bats @@ -117,6 +117,21 @@ teardown() { assert_output "hello world" } +@test "(config) config:clear" { + run ssh dokku@dokku.me config:set $TEST_APP test_var=true test_var2=\"hello world\" test_var3=\"with\\nnewline\" + echo "output: $output" + echo "status: $status" + assert_success + run /bin/bash -c "dokku config:clear $TEST_APP" + echo "output: $output" + echo "status: $status" + assert_success + run /bin/bash -c "dokku config:get $TEST_APP test_var" + echo "output: $output" + echo "status: $status" + assert_output "" +} + @test "(config) config:unset" { run ssh dokku@dokku.me config:set $TEST_APP test_var=true test_var2=\"hello world\" test_var3=\"with\\nnewline\" echo "output: $output"