Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
npezza93 committed Jan 17, 2025
1 parent 7a14606 commit 373a4c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lib/kamal/commands/registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@ def remove
docker(:rm, "kamal-docker-registry"),
by: "&&"
end

def local?
config.registry.local?
end
end
4 changes: 2 additions & 2 deletions test/cli/registry_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 373a4c1

Please sign in to comment.