aboutsummaryrefslogtreecommitdiffstats
path: root/tests/report_tests
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2021-04-29 11:26:39 -0400
committerJake Hunsaker <jhunsake@redhat.com>2021-05-18 12:11:22 -0400
commit8839f94428fa76c3d69e2afcea5fce538851214a (patch)
tree38ec17ce5781235072e2e2d1fdd2ae6f80de1a01 /tests/report_tests
parent575ddeddf2f6e1d6a639922f9ccc51c7e46fbe12 (diff)
downloadsos-8839f94428fa76c3d69e2afcea5fce538851214a.tar.gz
[report] Do not fail on skipping non-existing plugins
Specifying a non-existing plugin to skip is no longer considered a fatal error. This was previously in place, in part, for third party utilities calling sos to ensure adherence to known plugins. However, since `collect` has been integrated into sos natively, this is far less of a concern. Specfying non-existing plugins will now only generate a warning message for plugins wanting to be skipped (`-n`). If non-existing plugins are specified for enablement via `-e` or `-o`, that will still generate a fatal error. Closes: #537 Closes: #1723 Resolves: #2517 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'tests/report_tests')
-rw-r--r--tests/report_tests/exception_tests.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/report_tests/exception_tests.py b/tests/report_tests/exception_tests.py
index 652b9ebb..769954a0 100644
--- a/tests/report_tests/exception_tests.py
+++ b/tests/report_tests/exception_tests.py
@@ -6,7 +6,7 @@
#
# See the LICENSE file in the source distribution for further information.
-from sos_tests import StageOneReportExceptionTest
+from sos_tests import StageOneReportExceptionTest, StageOneReportTest
class InvalidPluginEnabledTest(StageOneReportExceptionTest):
@@ -41,3 +41,14 @@ class InvalidReportOptionTest(StageOneReportExceptionTest):
def test_caught_invalid_option(self):
self.assertOutputContains('unrecognized arguments\: --magic')
+
+class InvalidPluginDisableTest(StageOneReportTest):
+ """Ensure passing an invalid plugin name for skipping does not stop the
+ execution, see PR#2517
+
+ :avocado: tags=stageone
+ """
+ sos_cmd = '-n logs,foobar,networking'
+
+ def test_caught_invalid_plugin_name(self):
+ self.assertOutputContains("Requested to skip non-existing plugin 'foobar'")