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

@@ -71,6 +71,14 @@ class CommandsAccessoryTest < ActiveSupport::TestCase
new_command(:busybox).run.join(" ")
end
test "run in custom network" do
@config[:accessories]["mysql"]["network"] = "custom"
assert_equal \
"docker run --name app-mysql --detach --restart unless-stopped --network custom --log-opt max-size=\"10m\" --publish 3306:3306 --env MYSQL_ROOT_HOST=\"%\" --env-file .kamal/apps/app/env/accessories/mysql.env --label service=\"app-mysql\" private.registry/mysql:8.0",
new_command(:mysql).run.join(" ")
end
test "start" do
assert_equal \
"docker container start app-mysql",