summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2016-02-25 11:27:30 +0200
committerSaku Ytti <saku@ytti.fi>2016-02-25 11:27:30 +0200
commit82da30aa38329208126c37829501956162fa2c4d (patch)
tree35ca4e2035943edd9d034edaffdb715b45c031a2
parent83b4524ef8aa3a0caba7bad66eae094c43c21307 (diff)
fix ssh test
also fix warning about unused variable
-rw-r--r--lib/oxidized/input/ssh.rb2
-rw-r--r--spec/input/ssh_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb
index ec1a756..fef20d6 100644
--- a/lib/oxidized/input/ssh.rb
+++ b/lib/oxidized/input/ssh.rb
@@ -92,7 +92,7 @@ module Oxidized
@output << data
@output = @node.model.expects @output
end
- ch.request_pty (opts={:term=>'vt100'}) do |_ch, success_pty|
+ ch.request_pty (_opts={:term=>'vt100'}) do |_ch, success_pty|
raise NoShell, "Can't get PTY" unless success_pty
ch.send_channel_request 'shell' do |_ch, success_shell|
raise NoShell, "Can't get shell" unless success_shell
diff --git a/spec/input/ssh_spec.rb b/spec/input/ssh_spec.rb
index 0b6cf72..c4210f2 100644
--- a/spec/input/ssh_spec.rb
+++ b/spec/input/ssh_spec.rb
@@ -28,7 +28,7 @@ describe Oxidized::SSH do
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, :password => 'armud', :timeout => Oxidized.config.timeout,
:paranoid => Oxidized.config.input.ssh.secure, :auth_methods => ['none', 'publickey', 'password', 'keyboard-interactive'],
- :number_of_password_prompts => 0, :ssh_roxy => proxy})
+ :number_of_password_prompts => 0, :proxy => proxy})
ssh.instance_variable_set("@exec", true)
ssh.connect(@node)