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

Conversation

pmoravec
Copy link
Contributor

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


Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname [email protected]?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?

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: sosreport#3288

Signed-off-by: Pavel Moravec <[email protected]>
@@ -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.

@packit-as-a-service
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/sosreport-sos-3288
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

Copy link
Member

@TurboTurtle TurboTurtle left a comment

Choose a reason for hiding this comment

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

ack

@TurboTurtle TurboTurtle merged commit 2aec599 into sosreport:main Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants