diff options
author | Christopher Hunt <chrahunt@gmail.com> | 2014-05-04 12:56:55 -0400 |
---|---|---|
committer | Christopher Hunt <chrahunt@gmail.com> | 2014-05-04 12:56:55 -0400 |
commit | abee0e7fd9609d9c9b21eb6fabab27a3813b1eff (patch) | |
tree | 21b3a8c7acf565a501e2d2ec545e3d1237daf166 | |
parent | 8cdbcb159f65cd06c7b38f3e460553149bd0399c (diff) | |
download | net-ssh-abee0e7fd9609d9c9b21eb6fabab27a3813b1eff.tar.gz |
Add manual test for Pageant negotiation.
-rw-r--r-- | test/manual/test_pageant.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/manual/test_pageant.rb b/test/manual/test_pageant.rb new file mode 100644 index 0000000..5a74176 --- /dev/null +++ b/test/manual/test_pageant.rb @@ -0,0 +1,35 @@ +# $ ruby -Ilib -Itest -rrubygems test/manual/test_pageant.rb + +# +# Tests for communication capability with Pageant process running in +# different UAC context. +# +# Test prerequisite: +# - Pageant process running on machine in different UAC context from +# the command prompt running the test. +# + +require 'common' +require 'net/ssh/authentication/agent' + +module Authentication + + class TestPageant < Test::Unit::TestCase + + def test_agent_should_be_able_to_negotiate + assert_nothing_raised(Net::SSH::Authentication::AgentNotAvailable) { agent.negotiate! } + end + + private + + def agent(auto=:connect) + @agent ||= begin + agent = Net::SSH::Authentication::Agent.new + agent.connect! if auto == :connect + agent + end + end + + end + +end
\ No newline at end of file |