diff options
author | Bryan McLellan <btm@loftninjas.org> | 2019-05-13 13:36:18 -0400 |
---|---|---|
committer | Bryan McLellan <btm@loftninjas.org> | 2019-05-13 13:39:57 -0400 |
commit | f015d668e7661d9776fffcc6da012125f94704ea (patch) | |
tree | e750857433b7bd046a1af192ba7bc585ddd51f28 /spec | |
parent | 4e485c6944764bedb5e2b9b7b4ab9c5347df43d1 (diff) | |
download | chef-f015d668e7661d9776fffcc6da012125f94704ea.tar.gz |
Use new Net:SSH host key verify values
Fixes #8482 by prompting to continue if the host key is not recognized.
This attempts to tell Net:SSH to accept and write the key but it is only
temporarily accepting.
This changes the parameters of --ssh-verify-host-key (which is new) to
take the Net::SSH values, which get passed through by train. This allows
the user more options than only verifying or not.
Signed-off-by: Bryan McLellan <btm@loftninjas.org>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/knife/bootstrap_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/knife/bootstrap_spec.rb b/spec/unit/knife/bootstrap_spec.rb index 5280e3b64b..e0157b83a5 100644 --- a/spec/unit/knife/bootstrap_spec.rb +++ b/spec/unit/knife/bootstrap_spec.rb @@ -1131,7 +1131,7 @@ describe Chef::Knife::Bootstrap do logger: Chef::Log, keys_only: false, sudo: false, - verify_host_key: true, + verify_host_key: "always", non_interactive: true, } end @@ -1229,7 +1229,7 @@ describe Chef::Knife::Bootstrap do expect(knife.host_verify_opts).to eq( { verify_host_key: false } ) end it "provides a correct default when no option given" do - expect(knife.host_verify_opts).to eq( { verify_host_key: true } ) + expect(knife.host_verify_opts).to eq( { verify_host_key: "always"} ) end end end |