From ed90b99f0de99e03999f8e8f38330dce9113e87e Mon Sep 17 00:00:00 2001 From: Donal McBreen Date: Fri, 29 Mar 2024 10:51:57 +0000 Subject: [PATCH] Add tag_latest_image tests --- test/commands/app_test.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/commands/app_test.rb b/test/commands/app_test.rb index e5df6717..4c891124 100644 --- a/test/commands/app_test.rb +++ b/test/commands/app_test.rb @@ -339,6 +339,19 @@ class CommandsAppTest < ActiveSupport::TestCase new_command.remove_images.join(" ") end + test "tag_latest_image" do + assert_equal \ + "docker tag dhh/app:999 dhh/app:latest", + new_command.tag_latest_image.join(" ") + end + + test "tag_latest_image with destination" do + @destination = "staging" + assert_equal \ + "docker tag dhh/app:999 dhh/app:latest-staging", + new_command.tag_latest_image.join(" ") + end + test "make_env_directory" do assert_equal "mkdir -p .kamal/env/roles", new_command.make_env_directory.join(" ") end