aboutsummaryrefslogtreecommitdiffstats
path: root/tests/sos_tests.py
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2021-06-10 13:11:25 -0400
committerJake Hunsaker <jhunsake@redhat.com>2021-06-14 09:23:41 -0400
commit8ed7f525ef3b603f901f5d0aa1285bb3f6fd66a8 (patch)
treed0623f967b8e26a7c701209900107d7c7c5cc4f0 /tests/sos_tests.py
parent6725bf9280d4d2c93b5273518fe4d0cec15c58bc (diff)
downloadsos-8ed7f525ef3b603f901f5d0aa1285bb3f6fd66a8.tar.gz
[Plugin] Add default journal collection for Plugin services
Adds automatic collection of journals for any service defined in a plugin's `services` tuple, if that service exists on the system. Updates several plugins to define a `services` tuple in place of manually calling `add_journal()` (and as a bonus, removing redundant `add_service_status()` calls that are already performed based on the tuple). Additionally, add an appropriate tag to each `add_journal` call for easier collection lookup in the manifest. Resolves: #2579 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'tests/sos_tests.py')
-rw-r--r--tests/sos_tests.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/sos_tests.py b/tests/sos_tests.py
index 5df94794..8c8e6d05 100644
--- a/tests/sos_tests.py
+++ b/tests/sos_tests.py
@@ -651,6 +651,10 @@ class StageTwoReportTest(BaseSoSReportTest):
self.installer = software_manager
self.sm = self.installer.SoftwareManager()
+ for dist in self.packages:
+ if isinstance(self.packages[dist], str):
+ self.packages[dist] = [self.packages[dist]]
+
keys = self.packages.keys()
# allow for single declaration of packages for the RH family
# for our purposes centos == rhel here
@@ -716,7 +720,7 @@ class StageTwoReportTest(BaseSoSReportTest):
return
installed = self.installer.install_distro_packages(self.packages)
if not installed:
- raise("Unable to install requested packages %"
+ raise("Unable to install requested packages %s"
% ', '.join(pkg for pkg in self.packages[self.local_distro]))
# save installed package list to our tmpdir to be removed later
self._write_file_to_tmpdir('mocked_packages', json.dumps(self.packages[self.local_distro]))