Remove requires confirmation

This commit is contained in:
David Heinemeier Hansson
2023-02-19 16:30:00 +01:00
parent 745b09051e
commit 67cb89b9b9
2 changed files with 18 additions and 6 deletions

View File

@@ -31,6 +31,14 @@ class CliAccessoryTest < CliTestCase
end
end
test "remove with confirmation" do
run_command("remove", "mysql", "-y").tap do |output|
assert_match /docker container stop app-mysql/, output
assert_match /docker image prune -a -f --filter label=service=app-mysql/, output
assert_match /rm -rf app-mysql/, output
end
end
private
def run_command(*command)
stdouted { Mrsk::Cli::Accessory.start([*command, "-c", "test/fixtures/deploy_with_accessories.yml"]) }