diff options
author | Arif Ali <arif.ali@canonical.com> | 2024-04-10 01:05:13 +0100 |
---|---|---|
committer | Jake Hunsaker <jacob.r.hunsaker@gmail.com> | 2024-04-15 09:20:44 -0400 |
commit | 517e8315479cf86af734dfcda01cbc5574cc32cf (patch) | |
tree | f33df834d420d00af45b14083a85789bdd4cb6de /tests | |
parent | 93bcf51257ec4ce2b97c942e51e56546ce8cd0cd (diff) | |
download | sos-517e8315479cf86af734dfcda01cbc5574cc32cf.tar.gz |
[avocado] Upgrade avocado to 103.X LTS
* Extra changes required due to module and function changes in new
avocado
* CentOS Stream is now seen as centos-stream in avocado instead of
centos
* Fine tune tox for stage tests
Closes: #3588
Resolves: #3594
Co-authored-by: Jake Hunsaker <jacob.r.hunsaker@gmail.com>
Signed-off-by: Arif Ali <arif.ali@canonical.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/collect_tests/help_output_tests.py | 2 | ||||
-rw-r--r-- | tests/sos_tests.py | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/tests/collect_tests/help_output_tests.py b/tests/collect_tests/help_output_tests.py index 4a253f56..88f6d212 100644 --- a/tests/collect_tests/help_output_tests.py +++ b/tests/collect_tests/help_output_tests.py @@ -14,7 +14,7 @@ from avocado.utils import software_manager from sos_tests import StageOneOutputTest, SOS_REPO_ROOT, skipIf installer = software_manager -sm = installer.SoftwareManager() +sm = installer.manager.SoftwareManager() PEXPECT_PRESENT = sm.check_installed('python3-pexpect') diff --git a/tests/sos_tests.py b/tests/sos_tests.py index 4ba98eac..59374501 100644 --- a/tests/sos_tests.py +++ b/tests/sos_tests.py @@ -12,6 +12,7 @@ from avocado.core.output import LOG_UI from avocado import Test from avocado.utils import archive, process, distro, software_manager from avocado.utils.cpu import get_arch +from avocado.utils.software_manager import distro_packages from fnmatch import fnmatch import glob @@ -30,7 +31,7 @@ SOS_PLUGIN_DIR = os.path.realpath( SOS_TEST_DATA_DIR = os.path.realpath(os.path.join(SOS_TEST_DIR, 'test_data')) SOS_TEST_BIN = os.path.realpath(os.path.join(SOS_TEST_DIR, '../bin/sos')) -RH_DIST = ['rhel', 'centos', 'fedora'] +RH_DIST = ['rhel', 'centos', 'fedora', 'centos-stream'] UBUNTU_DIST = ['Ubuntu', 'debian'] @@ -816,10 +817,7 @@ class StageTwoReportTest(BaseSoSReportTest): def setUp(self): self.end_of_test_case = False - # seems awkward, but check_installed() and remove() are not exposed - # together with install_distro_packages() - self.installer = software_manager - self.sm = self.installer.SoftwareManager() + self.sm = software_manager.manager.SoftwareManager() for dist in self.packages: if isinstance(self.packages[dist], str): @@ -834,6 +832,7 @@ class StageTwoReportTest(BaseSoSReportTest): self.packages['fedora'] = self.packages['rhel'] if 'rhel' in keys: self.packages['centos'] = self.packages['rhel'] + self.packages['centos-stream'] = self.packages['rhel'] super(StageTwoReportTest, self).setUp() @@ -894,7 +893,7 @@ class StageTwoReportTest(BaseSoSReportTest): self._strip_installed_packages() if not self.packages[self.local_distro]: return - installed = self.installer.install_distro_packages(self.packages) + installed = distro_packages.install_distro_packages(self.packages) if not installed: raise Exception( "Unable to install requested packages %s" |