From 6e09d20d9c519b6bed28a8dc9c40fb4da851fa76 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Fri, 22 Jun 2018 22:12:42 +0300 Subject: fix tests --- spec/input/ssh_spec.rb | 16 ++++++++++------ 1 file 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) -- cgit v1.2.1