sosreport / sos

A unified tool for collecting system logs and other debug information
http://sos.rtfd.org
GNU General Public License v2.0
508 stars 544 forks source link

[tests] Allow tests to restrict OS version #3782

Open jcastill opened 1 week ago

jcastill commented 1 week ago

Add a new versions class attribute that allows test classes to specify which version(s) are allowed/designed to execute on. If the test is attempted to be executed on a version that's not specified, the test will be skipped and a message will be printed.

By default, the list of versions will be empty, which means that the test should run in all versions of the OS.

This patch contains a change to restrict the execution of Teamd to RHEL 8, because it was deprecated for RHEL 9 and later.


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

jcastill commented 1 week ago

Result of running this PR against a RHEL 9 where teamd is deprecated:

 (19/55) tests/report_tests/plugin_tests/teamd.py:TeamdPluginTest.test_teamd_plugin_executed: STARTED
 (19/55) tests/report_tests/plugin_tests/teamd.py:TeamdPluginTest.test_teamd_plugin_executed: SKIP: Unsupported OS version 9 (supports: ['8'])
 (20/55) tests/report_tests/plugin_tests/teamd.py:TeamdPluginTest.test_team_dev_iteration: STARTED
 (20/55) tests/report_tests/plugin_tests/teamd.py:TeamdPluginTest.test_team_dev_iteration: SKIP: Unsupported OS version 9 (supports: ['8'])
 (21/55) tests/report_tests/plugin_tests/teamd.py:TeamdPluginTest.test_archive_created: STARTED
 (21/55) tests/report_tests/plugin_tests/teamd.py:TeamdPluginTest.test_archive_created: SKIP: Unsupported OS version 9 (supports: ['8'])

Does this look ok?

packit-as-a-service[bot] commented 1 week ago

Congratulations! One of the builds has completed. :champagne:

You can install the built RPMs by following these steps:

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