summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/input/ssh_spec.rb16
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)