From 22b37f0482f84fc935ae9ece3c9722098c0573bc Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Mon, 30 Sep 2019 17:26:05 +0200 Subject: Count all active hypervisors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Else tempest_slow fails if one hypervisor is down (detected in ONAP Openlab). It also improves Shaker, Rally and Vmtp which count them. Change-Id: Iee7c20e0357d9237501c5c451580d8f6409ac86b Signed-off-by: Cédric Ollivier --- functest/tests/unit/openstack/rally/test_rally.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'functest/tests/unit') diff --git a/functest/tests/unit/openstack/rally/test_rally.py b/functest/tests/unit/openstack/rally/test_rally.py index c5cd5019e..c430e9794 100644 --- a/functest/tests/unit/openstack/rally/test_rally.py +++ b/functest/tests/unit/openstack/rally/test_rally.py @@ -291,8 +291,8 @@ class OSRallyTesting(unittest.TestCase): def test_prepare_run_flavor_alt_creation_failed(self, *args): # pylint: disable=unused-argument self.rally_base.stests = ['test1', 'test2'] - with mock.patch.object(self.rally_base.cloud, - 'list_hypervisors') as mock_list_hyperv, \ + with mock.patch.object(self.rally_base, 'count_active_hypervisors') \ + as mock_list_hyperv, \ mock.patch.object(self.rally_base, 'create_flavor_alt', side_effect=Exception) \ as mock_create_flavor: -- cgit 1.2.3-korg