aboutsummaryrefslogtreecommitdiffstats
path: root/tests/report_tests
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2021-04-07 09:59:55 -0400
committerJake Hunsaker <jhunsake@redhat.com>2021-04-15 11:58:10 -0400
commit4d8a6df10050fb2889400f160de3d0955bfebf1d (patch)
tree47689be5e55dd50307fb24f9dc97305a001644dd /tests/report_tests
parent5211c0248c50190c40d7fe604dfac507a53d8963 (diff)
downloadsos-4d8a6df10050fb2889400f160de3d0955bfebf1d.tar.gz
[tests] Add a test for default expected plugin enablement
Adds a test case to ensure that the plugins we can expect to always be enabled when a "normal" `sos report` command is run are in fact enabled. First, test the distro-independent plugins that do not have specific enablement triggers (and thus should always be enabled). Second, have a distro-specific test for distro-specific plugins that are also expected to always run on those systems. Closes: #2365 Resolves: #2431 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'tests/report_tests')
-rw-r--r--tests/report_tests/smoke_tests.py57
1 files changed, 56 insertions, 1 deletions
diff --git a/tests/report_tests/smoke_tests.py b/tests/report_tests/smoke_tests.py
index 89d5e301..cf79a076 100644
--- a/tests/report_tests/smoke_tests.py
+++ b/tests/report_tests/smoke_tests.py
@@ -10,7 +10,7 @@ import re
from avocado.utils import process
-from sos_tests import StageOneReportTest, SOS_BIN, redhat_only
+from sos_tests import StageOneReportTest, SOS_BIN, redhat_only, ubuntu_only
# These are the header strings in --list-plugins output
@@ -55,3 +55,58 @@ class AllPluginSmokeTest(StageOneReportTest):
self.assertOutputContains('Not logged in to OCP API, and no login token provided. Will not collect `oc` commands')
self.assertOutputContains('Source the environment file for the user intended to connect to the OpenStack environment.')
self.assertOutputContains('Some or all of the skydive params are not set properly.')
+
+
+class ExpectedDefaultPluginsTest(StageOneReportTest):
+ """Make sure that a default expected set of plugins runs on a "normal"
+ execution that does not provide any plugin-related options
+
+ :avocado: tags=stageone
+ """
+
+ sos_cmd = '-v '
+
+ def test_default_plugins_enabled(self):
+ """These plugins should run on all supported hosts by default everytime
+ """
+ self.assertPluginIncluded([
+ 'boot',
+ 'date',
+ 'filesys',
+ 'host',
+ 'kernel',
+ 'login',
+ 'logs',
+ 'pci',
+ 'process',
+ 'processor',
+ 'python',
+ 'release',
+ 'services',
+ 'udev',
+ 'usb'
+ ])
+
+ @redhat_only
+ def test_rhel_default_plugins(self):
+ """Plugins expected to always run on a RHEL (-like) system
+ """
+ self.assertPluginIncluded([
+ 'anaconda',
+ 'dnf',
+ 'rpm',
+ 'selinux',
+ 'unpackaged',
+ 'yum'
+ ])
+
+ @ubuntu_only
+ def test_ubuntu_default_plugins(self):
+ """Plugins expected to always run on a Ubuntu (-like) system
+ """
+ self.assertPluginIncluded([
+ 'apparmor',
+ 'apt',
+ 'ubuntu'
+ ])
+