diff options
author | Saku Ytti <saku@ytti.fi> | 2018-06-22 22:12:42 +0300 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2018-06-22 22:12:42 +0300 |
commit | 6e09d20d9c519b6bed28a8dc9c40fb4da851fa76 (patch) | |
tree | 6cf786c69956429dd26d044d376507dfe5282ab1 /spec | |
parent | b0de92d5b4ad3a4e54b9af951a7f80874ebf2dac (diff) |
fix tests
Diffstat (limited to 'spec')
-rw-r--r-- | spec/input/ssh_spec.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/spec/input/ssh_spec.rb b/spec/input/ssh_spec.rb index 0a3bd8d..f9704d4 100644 --- a/spec/input/ssh_spec.rb +++ b/spec/input/ssh_spec.rb @@ -5,6 +5,8 @@ describe Oxidized::SSH do before(:each) do Oxidized.asetus = Asetus.new Oxidized.setup_logger + Oxidized.config.timeout = 30 + Oxidized.config.input.ssh.secure = true Oxidized::Node.any_instance.stubs(:resolve_repo) Oxidized::Node.any_instance.stubs(:resolve_input) Oxidized::Node.any_instance.stubs(:resolve_output) @@ -30,13 +32,14 @@ describe Oxidized::SSH do proxy = mock Net::SSH::Proxy::Command.expects(:new).with("ssh test.com -W %h:%p").returns(proxy) Net::SSH.expects(:start).with('93.184.216.34', 'alma', port: 22, - timeout: Oxidized.config.timeout, paranoid: Oxidized.config.input.ssh.secure, keepalive: true, - proxy: proxy, + logger: Oxidized.logger, password: 'armud', + timeout: Oxidized.config.timeout, number_of_password_prompts: 0, - auth_methods: %w[none publickey password]) + auth_methods: %w[none publickey password], + proxy: proxy) ssh.instance_variable_set("@exec", true) ssh.connect(@node) @@ -61,13 +64,14 @@ describe Oxidized::SSH do proxy = mock Net::SSH::Proxy::Command.expects(:new).with("ssh test.com -W %h:%p").returns(proxy) Net::SSH.expects(:start).with('example.com', 'alma', port: 22, - timeout: Oxidized.config.timeout, paranoid: Oxidized.config.input.ssh.secure, keepalive: true, - proxy: proxy, + logger: Oxidized.logger, password: 'armud', + timeout: Oxidized.config.timeout, number_of_password_prompts: 0, - auth_methods: %w[none publickey password]) + auth_methods: %w[none publickey password], + proxy: proxy) ssh.instance_variable_set("@exec", true) ssh.connect(@node) |