-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Markdown Summary Output in report.go & add Tests in report_test.go
Implement generateMarkdownSummary() in report.go for Markdown CLI output Add test cases for generateMarkdownSummary() in report_test.go Introduce new output option summary-markdown for GitHub Action Add status icon to Markdown summary resolves: HACBS-2672 Signed-off-by: Sean Conroy [email protected]
- Loading branch information
Showing
3 changed files
with
221 additions
and
3 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
internal/applicationsnapshot/__snapshots__/report_test.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
|
||
[Test_GenerateMarkdownSummary/One_Warning_and_One_Success - 1] | ||
| Field | Value |Status| | ||
|-----------|-------|-------| | ||
| Time | 1970-01-01 00:00:00 | | | ||
| Successes | 1 | :white_check_mark: | | ||
| Failures | 0 | :white_check_mark: | | ||
| Warnings | 1 | :x: | | ||
| Result | | :white_check_mark: | | ||
|
||
--- | ||
|
||
[Test_GenerateMarkdownSummary/One_failure_and_One_Success - 1] | ||
| Field | Value |Status| | ||
|-----------|-------|-------| | ||
| Time | 1970-01-01 00:00:00 | | | ||
| Successes | 1 | :x: | | ||
| Failures | 1 | :x: | | ||
| Warnings | 0 | :white_check_mark: | | ||
| Result | | :white_check_mark: | | ||
|
||
--- | ||
|
||
[Test_GenerateMarkdownSummary/One_Failure_and_One_Violation - 1] | ||
| Field | Value |Status| | ||
|-----------|-------|-------| | ||
| Time | 1970-01-01 00:00:00 | | | ||
| Successes | 0 | :x: | | ||
| Failures | 1 | :x: | | ||
| Warnings | 1 | :x: | | ||
| Result | | :x: | | ||
|
||
--- | ||
|
||
[Test_GenerateMarkdownSummary/Multiple_Failure_and_One_Violation - 1] | ||
| Field | Value |Status| | ||
|-----------|-------|-------| | ||
| Time | 1970-01-01 00:00:00 | | | ||
| Successes | 0 | :x: | | ||
| Failures | 3 | :x: | | ||
| Warnings | 2 | :x: | | ||
| Result | | :x: | | ||
|
||
--- | ||
|
||
[Test_GenerateMarkdownSummary/With_success - 1] | ||
| Field | Value |Status| | ||
|-----------|-------|-------| | ||
| Time | 1970-01-01 00:00:00 | | | ||
| Successes | 3 | :white_check_mark: | | ||
| Failures | 0 | :white_check_mark: | | ||
| Warnings | 0 | :white_check_mark: | | ||
| Result | | :white_check_mark: | | ||
|
||
--- | ||
|
||
[Test_GenerateMarkdownSummary/With_Snapshot - 1] | ||
| Field | Value |Status| | ||
|-----------|-------|-------| | ||
| Time | 1970-01-01 00:00:00 | | | ||
| Successes | 0 | :x: | | ||
| Failures | 2 | :x: | | ||
| Warnings | 2 | :x: | | ||
| Result | | :x: | | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters