Added command tests

This commit is contained in:
Igor Alexandrov
2024-10-01 20:41:36 +04:00
parent b6a10df56a
commit 08dacd2745
3 changed files with 24 additions and 0 deletions

View File

@@ -27,6 +27,14 @@ class CommandsProxyTest < ActiveSupport::TestCase
new_command.run.join(" ")
end
test "run in custom network" do
@config[:network] = "custom"
assert_equal \
"docker run --name kamal-proxy --network custom --detach --restart unless-stopped --volume kamal-proxy-config:/home/kamal-proxy/.config/kamal-proxy $(cat .kamal/proxy/options || echo \"--publish 80:80 --publish 443:443\") basecamp/kamal-proxy:#{Kamal::Configuration::PROXY_MINIMUM_VERSION}",
new_command.run.join(" ")
end
test "proxy start" do
assert_equal \
"docker container start kamal-proxy",