forked from basecamp/kamal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Actually pass
ssh/config
through to SSHKit options
This option is documented as available since basecamp#908 in: https://github.com/basecamp/kamal/blob/74a06b0ccda616c86ebe1729d0795f39bcac9f00/lib/kamal/configuration/docs/ssh.yml#L65-L70 However, before this the options don't seem to pass through to SSHKit: https://github.com/basecamp/kamal/blob/74a06b0ccda616c86ebe1729d0795f39bcac9f00/lib/kamal/commander.rb#L167 Since `config` isn't actually returned in `#options`.
- Loading branch information
1 parent
2465681
commit e8a41af
Showing
4 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -300,6 +300,11 @@ class CommandsAppTest < ActiveSupport::TestCase | |
assert_equal "ssh -t [email protected] -p 2222 'ls'", new_command.run_over_ssh("ls", host: "1.1.1.1") | ||
end | ||
|
||
test "run over ssh with no config" do | ||
@config[:ssh] = { "config" => false } | ||
assert_equal "ssh -F none -t [email protected] -p 22 'ls'", new_command.run_over_ssh("ls", host: "1.1.1.1") | ||
end | ||
|
||
test "run over ssh with proxy" do | ||
@config[:ssh] = { "proxy" => "2.2.2.2" } | ||
assert_equal "ssh -J [email protected] -t [email protected] -p 22 'ls'", new_command.run_over_ssh("ls", host: "1.1.1.1") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,9 @@ class ConfigurationSshTest < ActiveSupport::TestCase | |
config = Kamal::Configuration.new(@deploy.tap { |c| c.merge!(ssh: { "proxy" => "[email protected]" }) }) | ||
assert_equal "[email protected]", config.ssh.options[:proxy].jump_proxies | ||
end | ||
|
||
test "ssh options with disabled ssh_config" do | ||
config = Kamal::Configuration.new(@deploy.tap { |c| c.merge!(ssh: { "config" => false }) }) | ||
assert_equal false, config.ssh.options[:config] | ||
end | ||
end |