diff options
-rw-r--r-- | functest/tests/unit/utils/test_functest_utils.py | 8 | ||||
-rw-r--r-- | functest/utils/functest_utils.py | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/functest/tests/unit/utils/test_functest_utils.py b/functest/tests/unit/utils/test_functest_utils.py index 07a57a49a..5992d3f60 100644 --- a/functest/tests/unit/utils/test_functest_utils.py +++ b/functest/tests/unit/utils/test_functest_utils.py @@ -336,6 +336,14 @@ class FunctestUtilsTesting(unittest.TestCase): args[0].assert_called_once_with(cloud) @mock.patch('functest.utils.functest_utils.get_nova_version', + return_value=(2, 89)) + def test_openstack_version14(self, *args): + cloud = mock.Mock() + self.assertEqual(functest_utils.get_openstack_version( + cloud), "Xena") + args[0].assert_called_once_with(cloud) + + @mock.patch('functest.utils.functest_utils.get_nova_version', return_value=None) def test_openstack_version_exc(self, *args): cloud = mock.Mock() diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py index 4078fb121..dab128c22 100644 --- a/functest/utils/functest_utils.py +++ b/functest/utils/functest_utils.py @@ -112,8 +112,10 @@ def get_openstack_version(cloud): version = get_nova_version(cloud) try: assert version - if version > (2, 88): + if version > (2, 90): osversion = "Master" + elif version > (2, 88): + osversion = "Xena" elif version > (2, 87): osversion = "Wallaby" elif version > (2, 79): |