Skip to content

Commit

Permalink
fix id_file tests since it's quoted always. VW will be proud.
Browse files Browse the repository at this point in the history
  • Loading branch information
emre committed Oct 20, 2015
1 parent 86c97ea commit c4fe6bc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def test_advanced_add(self):
with open(self.config_file) as f:
# check that property is really flushed out to the config?
content = f.read().encode('ascii')
self.assertIn(b"identityfile /tmp/idfilecheck.rsa", content)
self.assertIn(b'identityfile "/tmp/idfilecheck.rsa"', content)
self.assertIn(b"stricthostkeychecking yes", content)
self.assertIn(b"userknownhostsfile /dev/advanced_test", content)

Expand All @@ -184,7 +184,7 @@ def test_add_with_idfile(self):

with open(self.config_file) as f:
content = f.read().encode('ascii')
self.assertIn(b"identityfile /tmp/idfileonlycheck.rsa", content)
self.assertIn(b'identityfile "/tmp/idfileonlycheck.rsa"', content)

def test_basic_edit(self):
out, err, rc = self.run_cmd('edit aws.apache [email protected] {0}'.format(self.config_arg))
Expand Down Expand Up @@ -332,7 +332,7 @@ def test_add_host(self):
for item in self.storm.ssh_config.config_data:
if item.get("host") == 'google' or item.get("host") == 'goog':
self.assertEqual(item.get("options").get("port"), '22')
self.assertEqual(item.get("options").get("identityfile"), '/tmp/tmp.pub')
self.assertEqual(item.get("options").get("identityfile"), '"/tmp/tmp.pub"')

def test_clone_host(self):
self.storm.add_entry('google', 'google.com', 'ops', '24', '/tmp/tmp.pub')
Expand All @@ -346,7 +346,7 @@ def test_clone_host(self):

self.assertEqual(True, has_yahoo)
self.assertEqual(item.get("options").get("port"), '24')
self.assertEqual(item.get("options").get("identityfile"), '/tmp/tmp.pub')
self.assertEqual(item.get("options").get("identityfile"), '"/tmp/tmp.pub"')
self.assertEqual(item.get("options").get("user"), 'ops')

def test_move_host(self):
Expand All @@ -368,7 +368,7 @@ def test_move_host(self):
self.assertEqual(True, has_yahoo)
self.assertEqual(False, has_google)
self.assertEqual(item.get("options").get("port"), '24')
self.assertEqual(item.get("options").get("identityfile"), '/tmp/tmp.pub')
self.assertEqual(item.get("options").get("identityfile"), '"/tmp/tmp.pub"')
self.assertEqual(item.get("options").get("user"), 'ops')

def test_backup(self):
Expand Down

0 comments on commit c4fe6bc

Please sign in to comment.