Skip to content

Commit

Permalink
[tests] Make options_tests faster by calling them on a few plugins only
Browse files Browse the repository at this point in the history
options_tests.py tests -n option which means tens of plugins are
redundantly collected. Testing -o option is effectively the same while
the sosreport run needs a half time only.

The functionality of -n option is tested elsewhere, thus the change does
not shrink test coverage.

Resolves: #3288

Signed-off-by: Pavel Moravec <[email protected]>
  • Loading branch information
pmoravec authored and TurboTurtle committed Jun 27, 2023
1 parent 291eea5 commit 2aec599
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tests/report_tests/options_tests/options_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class OptionsFromConfigTest(StageTwoReportTest):
def test_case_id_from_config(self):
self.assertTrue('8675309' in self.archive)

def test_plugins_skipped_from_config(self):
self.assertPluginNotIncluded(['networking', 'logs'])
def test_plugins_only_from_config(self):
self.assertOnlyPluginsIncluded(['host', 'kernel'])

def test_plugopts_logged_from_config(self):
self.assertSosLogContains(
Expand All @@ -41,5 +41,5 @@ def test_plugopts_actually_set(self):

def test_effective_options_logged_correctly(self):
self.assertSosLogContains(
"effective options now: --batch --case-id 8675309 --plugopts kernel.with-timer=on,kernel.trace=yes --skip-plugins networking,logs"
"effective options now: --batch --case-id 8675309 --only-plugins host,kernel --plugopts kernel.with-timer=on,kernel.trace=yes"
)
2 changes: 1 addition & 1 deletion tests/report_tests/options_tests/options_tests_sos.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#verbose = 3

[report]
skip-plugins = networking,logs
only-plugins = host,kernel
case-id = 8675309

[collect]
Expand Down

0 comments on commit 2aec599

Please sign in to comment.