add rm to sshd tests
This commit is contained in:
@@ -29,6 +29,7 @@ class testBareSSHD( unittest.TestCase ):
|
|||||||
# verify that sshd is not running
|
# verify that sshd is not running
|
||||||
self.assertFalse( self.connected() )
|
self.assertFalse( self.connected() )
|
||||||
# create public key pair for testing
|
# create public key pair for testing
|
||||||
|
sh( 'rm -rf /tmp/ssh' )
|
||||||
sh( 'mkdir /tmp/ssh' )
|
sh( 'mkdir /tmp/ssh' )
|
||||||
sh( "ssh-keygen -t rsa -P '' -f /tmp/ssh/test_rsa" )
|
sh( "ssh-keygen -t rsa -P '' -f /tmp/ssh/test_rsa" )
|
||||||
sh( 'cat /tmp/ssh/test_rsa.pub >> /tmp/ssh/authorized_keys' )
|
sh( 'cat /tmp/ssh/test_rsa.pub >> /tmp/ssh/authorized_keys' )
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ class testSSHD( unittest.TestCase ):
|
|||||||
|
|
||||||
def setUp( self ):
|
def setUp( self ):
|
||||||
# create public key pair for testing
|
# create public key pair for testing
|
||||||
|
sh( 'rm -rf /tmp/ssh' )
|
||||||
sh( 'mkdir /tmp/ssh' )
|
sh( 'mkdir /tmp/ssh' )
|
||||||
sh( "ssh-keygen -t rsa -P '' -f /tmp/ssh/test_rsa" )
|
sh( "ssh-keygen -t rsa -P '' -f /tmp/ssh/test_rsa" )
|
||||||
sh( 'cat /tmp/ssh/test_rsa.pub >> /tmp/ssh/authorized_keys' )
|
sh( 'cat /tmp/ssh/test_rsa.pub >> /tmp/ssh/authorized_keys' )
|
||||||
|
|||||||
Reference in New Issue
Block a user