Optionally Skip Push for "envify"

This commit is contained in:
Krzysztof Adamski
2023-10-23 14:49:39 +02:00
parent 83a2d52ff4
commit 8ca04032a1
2 changed files with 10 additions and 1 deletions

View File

@@ -353,6 +353,14 @@ class CliMainTest < CliTestCase
run_command("envify", "-d", "world", config_file: "deploy_for_dest")
end
test "envify with skip_push" do
File.expects(:read).with(".env.erb").returns("HELLO=<%= 'world' %>")
File.expects(:write).with(".env", "HELLO=world", perm: 0600)
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:env:push").never
run_command("envify", "--skip-push")
end
test "remove with confirmation" do
run_command("remove", "-y", config_file: "deploy_with_accessories").tap do |output|
assert_match /docker container stop traefik/, output