bug fix: ssh authentiation error when run compass scenario in fuel 71/18671/2
authorrexlee8776 <limingjiang@huawei.com>
Mon, 15 Aug 2016 12:08:48 +0000 (12:08 +0000)
committerrexlee8776 <limingjiang@huawei.com>
Mon, 15 Aug 2016 15:28:51 +0000 (15:28 +0000)
JIRA: YARDSTICK-319

Change-Id: I25ee9a2582c751024b30e91eabf77aebb14a02f7
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
tests/unit/test_ssh.py
yardstick/ssh.py

index 574da03..a270524 100644 (file)
@@ -108,7 +108,9 @@ class SSHTestCase(unittest.TestCase):
             mock.call.set_missing_host_key_policy("autoadd"),
             mock.call.connect("example.net", username="admin",
                               port=22, pkey="key", key_filename=None,
-                              password=None, timeout=1),
+                              password=None,
+                              allow_agent=False, look_for_keys=False,
+                              timeout=1),
         ]
         self.assertEqual(client_calls, client.mock_calls)
 
index 2816a1c..cf890df 100644 (file)
@@ -121,7 +121,9 @@ class SSH(object):
             self._client.connect(self.host, username=self.user,
                                  port=self.port, pkey=self.pkey,
                                  key_filename=self.key_filename,
-                                 password=self.password, timeout=1)
+                                 password=self.password,
+                                 allow_agent=False, look_for_keys=False,
+                                 timeout=1)
             return self._client
         except Exception as e:
             message = ("Exception %(exception_type)s was raised "