Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] Make options_tests faster by calling them on a few plugins only #3288

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The effective options in fact do contain --plugopts kernel.with-timer=on,kernel.trace=yes,networking.traceroute=yes, even the option for disabled networking plugin. That is a tiny bug of resolving options that has no effect to the data collected (so imho not worth fixing it). Just this assert string is made in the way to work well even if the tiny bug would be fixed.

)
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