Allow use of bastion host

This commit is contained in:
Chris de Bruin
2023-01-27 10:07:24 +01:00
parent 2023c377ab
commit 1fef6ba505
3 changed files with 44 additions and 5 deletions

View File

@@ -140,10 +140,15 @@ class ConfigurationTest < ActiveSupport::TestCase
test "ssh options" do
assert_equal "root", @config.ssh_options[:user]
config = Mrsk::Configuration.new(@deploy.tap { |c| c[:ssh_user] = "app" })
config = Mrsk::Configuration.new(@deploy.tap { |c| c.merge!(ssh: { "user" => "app" }) })
assert_equal "app", @config.ssh_options[:user]
end
test "ssh options with proxy host" do
config = Mrsk::Configuration.new(@deploy.tap { |c| c.merge!(ssh: { "proxy_host" => "1.2.3.4" }) })
assert_equal "root@1.2.3.4", @config.ssh_options[:proxy].jump_proxies
end
test "master key" do
assert_equal "456", @config.master_key
end