forked from emre/storm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix id_file tests since it's quoted always. VW will be proud.
- Loading branch information
Showing
1 changed file
with
5 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
|
||
|
@@ -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)) | ||
|
@@ -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') | ||
|
@@ -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): | ||
|
@@ -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): | ||
|