aboutsummaryrefslogtreecommitdiffstats
path: root/tests/report_tests
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2021-04-06 13:00:56 -0400
committerJake Hunsaker <jhunsake@redhat.com>2021-04-15 11:33:04 -0400
commit3755bb250b1f82abdf48364e97d35bd8db37ad40 (patch)
tree56a774c82ed22c682f600c95cb8d969a35c47a49 /tests/report_tests
parent02ee553bb5079b4b7e4fcf6f2f31dd7cf86b827d (diff)
downloadsos-3755bb250b1f82abdf48364e97d35bd8db37ad40.tar.gz
[tests] Set local distro in StageOne to allow distro-specific tests
Moves the detection of the local system's distribution to StageOne, and defines two constants to reference RH and Ubuntu distribution lists to allow for distro-specific tests. Further, make the expected_warnings_displayed test skipped if the local test system is not a RH-family distro, as those warnings are not expected on non RH-family systems. Related: #2431 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'tests/report_tests')
-rw-r--r--tests/report_tests/smoke_tests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/report_tests/smoke_tests.py b/tests/report_tests/smoke_tests.py
index c184b374..cc186a91 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
+from sos_tests import StageOneReportTest, SOS_BIN, skipIf, RH_DIST
# These are the header strings in --list-plugins output
@@ -44,6 +44,7 @@ class AllPluginSmokeTest(StageOneReportTest):
for plugin in self.plugs:
self.assertPluginIncluded(plugin)
+ @skipIf(lambda x: x.local_distro not in RH_DIST, "Not distro relevant")
def test_expected_warnings_displayed(self):
"""We can expect specific plugins to always generate a warning during
setup if they are enabled on systems that are not configured for those