aboutsummaryrefslogtreecommitdiffstats
path: root/tests/report_tests
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2021-05-24 16:02:04 -0400
committerJake Hunsaker <jhunsake@redhat.com>2021-05-26 09:33:48 -0400
commit681a6ee9ac5b82e883c312273384fa9bbbd86681 (patch)
tree7a157cd933309c54d0232988f24dbc23da6316e8 /tests/report_tests
parentf7105cdfe49e0e6893632f1277368871481de65d (diff)
downloadsos-681a6ee9ac5b82e883c312273384fa9bbbd86681.tar.gz
[tests] Improve failed command reporting in test output
Improves error reporting for failed sos commands by logging stderr (or stdout if stderr is not populated) to the console, which was previously being truncated by the builtin error handling of avocado. Printed output is limited to the last 8k to avoid dumping several MBs at a time for scenarios such as timeouts where command failure may generate significant logging prior to failing. Included with this are 2 minor changes to existing tests. First, remove verbose output from the expected plugins test to reduce otherwise irrelevant output for command failures. Second limit the number of plugins run for the LogLevelTest, both to reduce overall run time for a test where we aren't testing specific plugins and to improve readability of failures for such a test. Resolves: #2556 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'tests/report_tests')
-rw-r--r--tests/report_tests/basic_report_tests.py2
-rw-r--r--tests/report_tests/smoke_tests.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/report_tests/basic_report_tests.py b/tests/report_tests/basic_report_tests.py
index 4a5e0001..2d2a6c30 100644
--- a/tests/report_tests/basic_report_tests.py
+++ b/tests/report_tests/basic_report_tests.py
@@ -39,7 +39,7 @@ class LogLevelTest(StageOneReportTest):
:avocado: tags=stageone
"""
- sos_cmd = '-vvv'
+ sos_cmd = '-vvv -o kernel,host,boot,filesys'
def test_archive_logging_enabled(self):
self.assertSosLogContains('DEBUG: \[archive:.*\]')
diff --git a/tests/report_tests/smoke_tests.py b/tests/report_tests/smoke_tests.py
index cf79a076..a313405e 100644
--- a/tests/report_tests/smoke_tests.py
+++ b/tests/report_tests/smoke_tests.py
@@ -64,7 +64,7 @@ class ExpectedDefaultPluginsTest(StageOneReportTest):
:avocado: tags=stageone
"""
- sos_cmd = '-v '
+ sos_cmd = ' '
def test_default_plugins_enabled(self):
"""These plugins should run on all supported hosts by default everytime