-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #400 from mrsked/revert-386-ssh-log-levels
Revert "Configurable SSH log levels"
- Loading branch information
Showing
3 changed files
with
6 additions
and
43 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 |
---|---|---|
|
@@ -211,21 +211,17 @@ class ConfigurationTest < ActiveSupport::TestCase | |
assert_equal "root", @config.ssh_options[:user] | ||
|
||
config = Mrsk::Configuration.new(@deploy.tap { |c| c.merge!(ssh: { "user" => "app" }) }) | ||
assert_equal "app", config.ssh_options[:user] | ||
assert_equal 4, config.ssh_options[:logger].level | ||
|
||
config = Mrsk::Configuration.new(@deploy.tap { |c| c.merge!(ssh: { "log_level" => "debug" }) }) | ||
assert_equal 0, config.ssh_options[:logger].level | ||
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" => "1.2.3.4" }) }) | ||
assert_equal "[email protected]", config.ssh_options[:proxy].jump_proxies | ||
assert_equal "[email protected]", @config.ssh_options[:proxy].jump_proxies | ||
end | ||
|
||
test "ssh options with proxy host and user" do | ||
config = Mrsk::Configuration.new(@deploy.tap { |c| c.merge!(ssh: { "proxy" => "[email protected]" }) }) | ||
assert_equal "[email protected]", config.ssh_options[:proxy].jump_proxies | ||
assert_equal "[email protected]", @config.ssh_options[:proxy].jump_proxies | ||
end | ||
|
||
test "volume_args" do | ||
|
@@ -270,22 +266,7 @@ class ConfigurationTest < ActiveSupport::TestCase | |
end | ||
|
||
test "to_h" do | ||
assert_equal({ | ||
:roles=>["web"], | ||
:hosts=>["1.1.1.1", "1.1.1.2"], | ||
:primary_host=>"1.1.1.1", | ||
:version=>"missing", | ||
:repository=>"dhh/app", | ||
:absolute_image=>"dhh/app:missing", | ||
:service_with_version=>"app-missing", | ||
:env_args=>["-e", "REDIS_URL=\"redis://x/y\""], | ||
:ssh_options=>{:user=>"root", :auth_methods=>["publickey"]}, | ||
:ssh_log_level=>4, | ||
:volume_args=>["--volume", "/local/path:/container/path"], | ||
:builder=>{}, | ||
:logging=>["--log-opt", "max-size=\"10m\""], | ||
:healthcheck=>{"path"=>"/up", "port"=>3000, "max_attempts" => 7 } | ||
}, @config.to_h) | ||
assert_equal({ :roles=>["web"], :hosts=>["1.1.1.1", "1.1.1.2"], :primary_host=>"1.1.1.1", :version=>"missing", :repository=>"dhh/app", :absolute_image=>"dhh/app:missing", :service_with_version=>"app-missing", :env_args=>["-e", "REDIS_URL=\"redis://x/y\""], :ssh_options=>{:user=>"root", :auth_methods=>["publickey"]}, :volume_args=>["--volume", "/local/path:/container/path"], :builder=>{}, :logging=>["--log-opt", "max-size=\"10m\""], :healthcheck=>{"path"=>"/up", "port"=>3000, "max_attempts" => 7 }}, @config.to_h) | ||
end | ||
|
||
test "min version is lower" do | ||
|