Login to the registry proactively before stoping Accessory and Traefik

This commit is contained in:
Igor Alexandrov
2023-06-22 15:13:47 +04:00
parent 9a501867b4
commit 2746a48e88
4 changed files with 22 additions and 8 deletions

View File

@@ -40,9 +40,10 @@ class CliAccessoryTest < CliTestCase
end
test "reboot" do
Mrsk::Commands::Registry.any_instance.expects(:login)
Mrsk::Cli::Accessory.any_instance.expects(:stop).with("mysql")
Mrsk::Cli::Accessory.any_instance.expects(:remove_container).with("mysql")
Mrsk::Cli::Accessory.any_instance.expects(:boot).with("mysql")
Mrsk::Cli::Accessory.any_instance.expects(:boot).with("mysql", login: false)
run_command("reboot", "mysql")
end

View File

@@ -9,9 +9,10 @@ class CliTraefikTest < CliTestCase
end
test "reboot" do
Mrsk::Commands::Registry.any_instance.expects(:login).twice
Mrsk::Cli::Traefik.any_instance.expects(:stop)
Mrsk::Cli::Traefik.any_instance.expects(:remove_container)
Mrsk::Cli::Traefik.any_instance.expects(:boot)
Mrsk::Cli::Traefik.any_instance.expects(:boot).with(login: false)
run_command("reboot")
end