diff options
-rw-r--r-- | functest/ci/check_deployment.py | 2 | ||||
-rw-r--r-- | functest/tests/unit/ci/test_check_deployment.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/functest/ci/check_deployment.py b/functest/ci/check_deployment.py index 81607dffe..8d19d8504 100644 --- a/functest/ci/check_deployment.py +++ b/functest/ci/check_deployment.py @@ -44,7 +44,7 @@ def verify_connectivity(endpoint): port = url.port if not port: port = 443 if url.scheme == "https" else 80 - connection.connect(url.hostname, port) + connection.connect((url.hostname, port)) LOGGER.debug('%s:%s is reachable!', url.hostname, port) return True except socket.error: diff --git a/functest/tests/unit/ci/test_check_deployment.py b/functest/tests/unit/ci/test_check_deployment.py index 46dcc24c5..aeeca5871 100644 --- a/functest/tests/unit/ci/test_check_deployment.py +++ b/functest/tests/unit/ci/test_check_deployment.py @@ -45,25 +45,25 @@ class CheckDeploymentTesting(unittest.TestCase): @mock.patch('socket.socket.connect', side_effect=TypeError) def test_verify_connectivity_ko1(self, *args): self.assertFalse(check_deployment.verify_connectivity("127.0.0.1")) - args[0].assert_called_once_with(None, 80) + args[0].assert_called_once_with((None, 80)) @mock.patch('socket.socket.connect', side_effect=socket.error) def test_verify_connectivity_ko2(self, *args): self.assertFalse( check_deployment.verify_connectivity("http://127.0.0.1")) - args[0].assert_called_once_with("127.0.0.1", 80) + args[0].assert_called_once_with(("127.0.0.1", 80)) @mock.patch('socket.socket.connect', side_effect=socket.error) def test_verify_connectivity_ko3(self, *args): self.assertFalse( check_deployment.verify_connectivity("https://127.0.0.1")) - args[0].assert_called_once_with("127.0.0.1", 443) + args[0].assert_called_once_with(("127.0.0.1", 443)) @mock.patch('socket.socket.connect') def test_verify_connectivity(self, *args): self.assertTrue( check_deployment.verify_connectivity("https://127.0.0.1")) - args[0].assert_called_once_with("127.0.0.1", 443) + args[0].assert_called_once_with(("127.0.0.1", 443)) @mock.patch('snaps.openstack.utils.keystone_utils.keystone_session', return_value=mock.Mock( |