aboutsummaryrefslogtreecommitdiff
path: root/kolla/tests
diff options
context:
space:
mode:
Diffstat (limited to 'kolla/tests')
-rw-r--r--kolla/tests/test_build.py29
-rw-r--r--kolla/tests/test_methods.py18
2 files changed, 10 insertions, 37 deletions
diff --git a/kolla/tests/test_build.py b/kolla/tests/test_build.py
index 1b633de4c..ad5e47600 100644
--- a/kolla/tests/test_build.py
+++ b/kolla/tests/test_build.py
@@ -551,19 +551,12 @@ class KollaWorkerTest(base.TestCase):
kolla = build.KollaWorker(self.conf)
self.assertEqual('3.6', kolla.distro_python_version)
- def test_build_distro_python_version_centos7(self):
- """check distro_python_version for CentOS 7.6.1810"""
+ def test_build_distro_python_version_centos(self):
+ """check distro_python_version for CentOS 8.0.1905"""
self.conf.set_override('base', 'centos')
- self.conf.set_override('base_tag', '7.6.1810')
+ self.conf.set_override('base_tag', '8.0.1905')
kolla = build.KollaWorker(self.conf)
- self.assertEqual('2.7', kolla.distro_python_version)
-
- def test_build_distro_python_version_rhel7(self):
- """check distro_python_version for RHEL7"""
- self.conf.set_override('base', 'rhel')
- self.conf.set_override('base_tag', '7')
- kolla = build.KollaWorker(self.conf)
- self.assertEqual('2.7', kolla.distro_python_version)
+ self.assertEqual('3.6', kolla.distro_python_version)
def test_build_distro_package_manager(self):
"""check distro_package_manager conf value is taken"""
@@ -585,20 +578,6 @@ class KollaWorkerTest(base.TestCase):
kolla = build.KollaWorker(self.conf)
self.assertEqual('dnf', kolla.distro_package_manager)
- def test_build_distro_package_manager_rhel7(self):
- """check distro_package_manager yum for rhel7"""
- self.conf.set_override('base', 'rhel')
- self.conf.set_override('base_tag', '7')
- kolla = build.KollaWorker(self.conf)
- self.assertEqual('yum', kolla.distro_package_manager)
-
- def test_build_distro_package_manager_rhel7_minor(self):
- """check distro_package_manager yum for rhel7"""
- self.conf.set_override('base', 'rhel')
- self.conf.set_override('base_tag', '7.6.1801')
- kolla = build.KollaWorker(self.conf)
- self.assertEqual('yum', kolla.distro_package_manager)
-
def test_build_distro_package_manager_debian(self):
"""check distro_package_manager apt for debian"""
self.conf.set_override('base', 'debian')
diff --git a/kolla/tests/test_methods.py b/kolla/tests/test_methods.py
index bc2021a98..0a1c5bd5a 100644
--- a/kolla/tests/test_methods.py
+++ b/kolla/tests/test_methods.py
@@ -27,7 +27,6 @@ class MethodsTest(base.TestCase):
'base_arch': 'x86_64',
'base_distro': 'rhel',
'base_package_type': 'rpm',
- 'distro_package_manager': 'yum'
}
result = methods.handle_repos(template_vars, ['grafana'], 'enable')
@@ -39,11 +38,10 @@ class MethodsTest(base.TestCase):
'base_arch': 'x86_64',
'base_distro': 'centos',
'base_package_type': 'rpm',
- 'distro_package_manager': 'yum'
}
result = methods.handle_repos(template_vars, ['grafana'], 'enable')
- expectCmd = 'RUN yum-config-manager --enable grafana'
+ expectCmd = 'RUN dnf config-manager --enable grafana || true'
self.assertEqual(expectCmd, result)
def test_enable_repos_centos_missing_repo(self):
@@ -51,7 +49,6 @@ class MethodsTest(base.TestCase):
'base_arch': 'x86_64',
'base_distro': 'centos',
'base_package_type': 'rpm',
- 'distro_package_manager': 'yum'
}
result = methods.handle_repos(template_vars, ['missing_repo'],
@@ -64,13 +61,12 @@ class MethodsTest(base.TestCase):
'base_arch': 'x86_64',
'base_distro': 'centos',
'base_package_type': 'rpm',
- 'distro_package_manager': 'yum'
}
result = methods.handle_repos(template_vars, ['grafana', 'ceph'],
'enable')
- expectCmd = 'RUN yum-config-manager --enable grafana '
- expectCmd += '--enable centos-ceph-nautilus'
+ expectCmd = 'RUN dnf config-manager --enable grafana '
+ expectCmd += '--enable centos-ceph-nautilus || true'
self.assertEqual(expectCmd, result)
def test_enable_repos_debian(self):
@@ -118,11 +114,10 @@ class MethodsTest(base.TestCase):
'base_arch': 'x86_64',
'base_distro': 'centos',
'base_package_type': 'rpm',
- 'distro_package_manager': 'yum'
}
result = methods.handle_repos(template_vars, ['grafana'], 'disable')
- expectCmd = 'RUN yum-config-manager --disable grafana'
+ expectCmd = 'RUN dnf config-manager --disable grafana || true'
self.assertEqual(expectCmd, result)
def test_disable_repos_centos_multiple(self):
@@ -130,13 +125,12 @@ class MethodsTest(base.TestCase):
'base_arch': 'x86_64',
'base_distro': 'centos',
'base_package_type': 'rpm',
- 'distro_package_manager': 'yum'
}
result = methods.handle_repos(template_vars, ['grafana', 'ceph'],
'disable')
- expectCmd = 'RUN yum-config-manager --disable grafana '
- expectCmd += '--disable centos-ceph-nautilus'
+ expectCmd = 'RUN dnf config-manager --disable grafana '
+ expectCmd += '--disable centos-ceph-nautilus || true'
self.assertEqual(expectCmd, result)
# NOTE(hrw): there is no disabling of repos for Debian/Ubuntu