diff options
author | kasif <kadnan@progress.com> | 2021-12-08 12:58:31 +0530 |
---|---|---|
committer | kasif <kadnan@progress.com> | 2021-12-08 12:58:31 +0530 |
commit | 8efc25a9a976aa15240a09cbb928d48fbb231dda (patch) | |
tree | d942f7a8e6b307cba230d4ae223438cfb06258d9 /knife | |
parent | ef67f3790036eb1ba297a6d7fa1a59e77a9dc033 (diff) | |
download | chef-8efc25a9a976aa15240a09cbb928d48fbb231dda.tar.gz |
update specka/12281-fix-knife-bootstrap-issue
Signed-off-by: kasif <kadnan@progress.com>
Diffstat (limited to 'knife')
-rw-r--r-- | knife/spec/unit/knife/bootstrap_spec.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/knife/spec/unit/knife/bootstrap_spec.rb b/knife/spec/unit/knife/bootstrap_spec.rb index dc5e589c52..bb613f6646 100644 --- a/knife/spec/unit/knife/bootstrap_spec.rb +++ b/knife/spec/unit/knife/bootstrap_spec.rb @@ -817,7 +817,7 @@ describe Chef::Knife::Bootstrap do # Set everything to easily identifiable and obviously fake values # to verify that Chef::Config is being sourced instead of knife.config knife.config = {} - Chef::Config[:knife][:max_wait] = 9999 + Chef::Config[:knife][:max_wait] = 9999.0 Chef::Config[:knife][:winrm_user] = "winbob" Chef::Config[:knife][:winrm_port] = 9999 Chef::Config[:knife][:ca_trust_file] = "trust.me" @@ -836,7 +836,7 @@ describe Chef::Knife::Bootstrap do { logger: Chef::Log, # not configurable ca_trust_path: "trust.me", - max_wait_until_ready: 9999, + max_wait_until_ready: 9999, # converted to int operation_timeout: 9999, ssl_peer_fingerprint: "ABCDEF", winrm_transport: "kerberos", @@ -899,7 +899,7 @@ describe Chef::Knife::Bootstrap do # pull in the Chef::Config value Chef::Config[:knife][:winrm_auth_method] = "negotiate" knife.config[:connection_password] = "blue" - knife.config[:max_wait] = 1000 + knife.config[:max_wait] = 1000.0 knife.config[:connection_user] = "clippy" knife.config[:connection_port] = 1000 knife.config[:winrm_port] = 1001 # We should not see this value get used @@ -918,7 +918,7 @@ describe Chef::Knife::Bootstrap do { logger: Chef::Log, # not configurable ca_trust_path: "trust.the.internet", - max_wait_until_ready: 1000, + max_wait_until_ready: 1000, # converted to int operation_timeout: 1000, ssl_peer_fingerprint: "FEDCBA", winrm_transport: "kerberos", @@ -971,7 +971,7 @@ describe Chef::Knife::Bootstrap do # Set everything to easily identifiable and obviously fake values # to verify that Chef::Config is being sourced instead of knife.config knife.config = {} - Chef::Config[:knife][:max_wait] = 9999 + Chef::Config[:knife][:max_wait] = 9999.0 Chef::Config[:knife][:session_timeout] = 9999 Chef::Config[:knife][:ssh_user] = "sshbob" Chef::Config[:knife][:ssh_port] = 9999 @@ -986,7 +986,7 @@ describe Chef::Knife::Bootstrap do let(:expected_result) do { logger: Chef::Log, # not configurable - max_wait_until_ready: 9999.0, + max_wait_until_ready: 9999, # converted to int connection_timeout: 9999, user: "sshbob", bastion_host: "mygateway.local", @@ -1032,7 +1032,7 @@ describe Chef::Knife::Bootstrap do knife.config[:connection_port] = 12 knife.config[:ssh_port] = "13" # canary to indirectly verify we're not looking for the wrong CLI flag knife.config[:connection_password] = "feta cheese" - knife.config[:max_wait] = 150 + knife.config[:max_wait] = 150.0 knife.config[:session_timeout] = 120 knife.config[:use_sudo] = true knife.config[:use_sudo_pasword] = true @@ -1042,7 +1042,7 @@ describe Chef::Knife::Bootstrap do let(:expected_result) do { logger: Chef::Log, # not configurable - max_wait_until_ready: 150.0, # cli + max_wait_until_ready: 150, # cli (converted to int) connection_timeout: 120, # cli user: "sshalice", # cli password: "feta cheese", # cli @@ -1068,7 +1068,7 @@ describe Chef::Knife::Bootstrap do context "and all CLI options have been given" do before do knife.config = {} - knife.config[:max_wait] = 150 + knife.config[:max_wait] = 150.0 knife.config[:session_timeout] = 120 knife.config[:connection_user] = "sshroot" knife.config[:connection_port] = 1000 @@ -1093,7 +1093,7 @@ describe Chef::Knife::Bootstrap do let(:expected_result) do { logger: Chef::Log, # not configurable - max_wait_until_ready: 150, + max_wait_until_ready: 150, # converted to int connection_timeout: 120, user: "sshroot", password: "blah", |