aboutsummaryrefslogtreecommitdiffstats
path: root/tests/sos_tests.py
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2021-04-06 10:50:23 -0400
committerJake Hunsaker <jhunsake@redhat.com>2021-04-15 11:33:04 -0400
commit02ee553bb5079b4b7e4fcf6f2f31dd7cf86b827d (patch)
tree38e62b863b6a5007782fecf818b1ba8a5d68f857 /tests/sos_tests.py
parent05b456451be1340cf94efacb37fae5130f60f5e1 (diff)
downloadsos-02ee553bb5079b4b7e4fcf6f2f31dd7cf86b827d.tar.gz
[tests] Add a pre-setup setup method and smoke tests
First, add a "pre-setup setup" method, in the form of `pre_sos_setup()`, that can be used in the way the traditional `setUp()` method would be used (but can't because that's our entry point for executing our sos runs). This method will be executed _prior_ to any mocking. Second, add a smoke test that enables all plugins that exist in the local branch being tested. This will test that doing so does not generate any exceptions and that some expected warnings from select plugins are displayed. Related: #2431 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'tests/sos_tests.py')
-rw-r--r--tests/sos_tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/sos_tests.py b/tests/sos_tests.py
index 72d6c244..7e69bc17 100644
--- a/tests/sos_tests.py
+++ b/tests/sos_tests.py
@@ -223,6 +223,12 @@ class BaseSoSReportTest(BaseSoSTest):
"""
pass
+ def pre_sos_setup(self):
+ """Do any needed non-mocking setup prior to the sos execution that is
+ called in setUp()
+ """
+ pass
+
def setUp(self):
"""Execute and extract the sos report to our temporary location, then
call sos_setup() for individual test case setup and/or mocking.
@@ -232,6 +238,9 @@ class BaseSoSReportTest(BaseSoSTest):
# setup our class-shared tmpdir
self._setup_tmpdir()
+ # do any pre-execution setup
+ self.pre_sos_setup()
+
# do mocking called for in stage 2+ tests
self.setup_mocking()