-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #281 from shermdog/sshident
Fixed ssh-key auth
- Loading branch information
Showing
2 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
''' | ||
@author: rsherman | ||
''' | ||
import unittest | ||
from nose.plugins.attrib import attr | ||
|
||
from jnpr.junos import Device | ||
|
||
|
||
@attr('functional') | ||
class TestDeviceSsh(unittest.TestCase): | ||
|
||
def tearDown(self): | ||
self.dev.close() | ||
|
||
def test_device_open_default_key(self): | ||
self.dev = Device('pabst.englab.juniper.net') | ||
self.dev.open() | ||
self.assertEqual(self.dev.connected, True) | ||
|
||
def test_device_open_key_pass(self): | ||
self.dev = Device(host='pabst.englab.juniper.net', ssh_private_key_file='/var/lib/jenkins/.ssh/passkey', passwd='password') | ||
self.dev.open() | ||
self.assertEqual(self.dev.connected, True) |