Skip to content

Commit

Permalink
Functional test for SSH keys (non-agent)
Browse files Browse the repository at this point in the history
  • Loading branch information
shermdog committed Jul 17, 2014
1 parent 7abe593 commit 9f32d68
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/functional/test_device_ssh.py
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)

0 comments on commit 9f32d68

Please sign in to comment.