diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2023-05-01 09:05:27 -0400 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2023-05-02 08:44:33 -0400 |
commit | dbed338bd13e5abda817175cd698a8664349f89a (patch) | |
tree | 50b57f6e22d69ad709810b74ed5c03f022933510 /tests/product_tests | |
parent | c675e5eb3af7d0f301af2e21a321a1841c199126 (diff) | |
download | sos-dbed338bd13e5abda817175cd698a8664349f89a.tar.gz |
[tests] Allow tests to restrict execution architecture
Adds a new `arch` class attr that allows test classes to specify which
architecture(s) they are allowed/designed to execute on. If the test is
attempted to be executed on an architecture that is not in the specified
list, we will skip the test before any setup or sos executions are done.
By default, the `arch` class attr is an empty list, which implies that
the test can run on _any_ architecture. Tests should specify `arch` as a
list even for single-arch tests.
Included in this change is restricting the Foreman tests to x86_64 only,
as that is the only architecture on which that product is supported.
Closes: #3186
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'tests/product_tests')
-rw-r--r-- | tests/product_tests/foreman/foreman_tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/product_tests/foreman/foreman_tests.py b/tests/product_tests/foreman/foreman_tests.py index 7813b6a4..dd37f793 100644 --- a/tests/product_tests/foreman/foreman_tests.py +++ b/tests/product_tests/foreman/foreman_tests.py @@ -26,6 +26,7 @@ class ForemanBasicTest(StageOneReportTest): """ sos_cmd = '-v' + arch = ['x86_64'] def test_tfm_plugins_ran(self): self.assertPluginIncluded([ @@ -102,6 +103,7 @@ class ForemanWithOptionsTest(StageOneReportTest): """ sos_cmd = '-v -k foreman.proxyfeatures=on' + arch = ['x86_64'] @redhat_only def test_proxyfeatures_collected(self): @@ -115,6 +117,7 @@ class ForemanInstallerTest(StageOneReportTest): """ sos_cmd = '-v -o foreman_installer' + arch = ['x86_64'] def test_foreman_installer_etc_collected(self): self.assertFileCollected("/etc/foreman-installer/scenarios.d") @@ -127,6 +130,7 @@ class ForemanProxyTest(StageOneReportTest): """ sos_cmd = '-v -o foreman_proxy' + arch = ['x86_64'] def test_foreman_proxy_settings_collected(self): self.assertFileCollected("/etc/foreman-proxy/settings.yml") |