diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2022-10-13 15:38:58 -0400 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2022-10-24 16:00:12 -0400 |
commit | a0112b5a4b68b5bb88a01f5b33ff99ce075b8a87 (patch) | |
tree | d53066d56a26c102d0c42da8e1bb170360cbc8a7 /tests/report_tests/basic_report_tests.py | |
parent | cf81e71f134fb482bbe708abb6d5c356573c4c08 (diff) | |
download | sos-a0112b5a4b68b5bb88a01f5b33ff99ce075b8a87.tar.gz |
[report,Plugin] Add a tag summary to report manifest
After all plugins have run, sos will now generate a "tag summary" and
add it to the report section of the manifest. This summary will be a
json-formatted entry that details all collections within the report that
have any tag associated with them at all. This should allow for easier
parsing of the manifest by analyzers such as Red Hat Insights.
As part of this change, commands will no longer be automatically tagged
with the name of the binary used in the command collection.
Additionally, manual collections performed by a plugin's `collect()`
method will now be recorded in the manifest in the same manner as file
and command output collections.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'tests/report_tests/basic_report_tests.py')
-rw-r--r-- | tests/report_tests/basic_report_tests.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/report_tests/basic_report_tests.py b/tests/report_tests/basic_report_tests.py index f98d0f6e..c5d7d3ae 100644 --- a/tests/report_tests/basic_report_tests.py +++ b/tests/report_tests/basic_report_tests.py @@ -33,6 +33,15 @@ class NormalSoSReport(StageOneReportTest): def test_free_symlink_created(self): self.assertFileCollected('free') + def test_tag_summary_created(self): + self.assertTrue( + 'tag_summary' in self.manifest['components']['report'], + "No tag summary generated in report" + ) + self.assertTrue( + isinstance(self.manifest['components']['report']['tag_summary'], dict), + "Tag summary malformed" + ) class LogLevelTest(StageOneReportTest): """ |