From 373a4c19facc8d2d54d839c671a7a36d9d7335b0 Mon Sep 17 00:00:00 2001 From: Nick Pezza Date: Fri, 17 Jan 2025 12:17:27 -0500 Subject: [PATCH] fix tests --- lib/kamal/commands/registry.rb | 4 ++++ test/cli/registry_test.rb | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/kamal/commands/registry.rb b/lib/kamal/commands/registry.rb index 2cd3521e6..ddf835c78 100644 --- a/lib/kamal/commands/registry.rb +++ b/lib/kamal/commands/registry.rb @@ -31,4 +31,8 @@ def remove docker(:rm, "kamal-docker-registry"), by: "&&" end + + def local? + config.registry.local? + end end diff --git a/test/cli/registry_test.rb b/test/cli/registry_test.rb index 409ee1607..114f06195 100644 --- a/test/cli/registry_test.rb +++ b/test/cli/registry_test.rb @@ -43,13 +43,13 @@ class CliRegistryTest < CliTestCase end end - test "login with no docker" do + test "setup with no docker" do stub_setup SSHKit::Backend::Abstract.any_instance.stubs(:execute) .with(:docker, "--version", "&&", :docker, :buildx, "version") .raises(SSHKit::Command::Failed.new("command not found")) - assert_raises(Kamal::Cli::DependencyError) { run_command("login") } + assert_raises(Kamal::Cli::DependencyError) { run_command("setup") } end test "setup local registry" do