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 dcbbd79e5..da3b03c80 100644 --- a/functest/tests/unit/utils/test_functest_utils.py +++ b/functest/tests/unit/utils/test_functest_utils.py @@ -331,6 +331,14 @@ class FunctestUtilsTesting(unittest.TestCase): args[0].assert_called_once_with(cloud) @mock.patch('functest.utils.functest_utils.get_nova_version', + return_value=(2, 66)) + def test_openstack_version11(self, *args): + cloud = mock.Mock() + self.assertEqual(functest_utils.get_openstack_version( + cloud), "Stein") + 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 b49337de2..19d5baf92 100644 --- a/functest/utils/functest_utils.py +++ b/functest/utils/functest_utils.py @@ -111,8 +111,10 @@ def get_openstack_version(cloud): version = get_nova_version(cloud) try: assert version - if version > (2, 65): + if version > (2, 72): osversion = "Master" + elif version > (2, 65): + osversion = "Stein" elif version > (2, 60): osversion = "Rocky" elif version > (2, 53): |