Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UniqueID to XML Output #5092

Merged
merged 4 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/fragments/uid-output.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
entries:
- description: >
If an optional UniqueID is provided by a user in the scorecard config and the user generates XML output the UID will be appended to the test result output.
kind: "addition"
breaking: false
7 changes: 5 additions & 2 deletions internal/cmd/operator-sdk/scorecard/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,11 @@ func (c *scorecardCmd) convertXunit(output v1alpha3.TestList) xunit.TestSuites {
}
tSuite.TestCases = append(tSuite.TestCases, tCase)
tSuite.URL = item.Spec.Image
//TODO: Add TestStuite ID when API updates version
//tSuite.ID = item.Spec.UniqueID
if item.Spec.UniqueID != "" {
tSuite.ID = item.Spec.UniqueID
} else {
tSuite.ID = res.Name
}
resultSuite.TestSuite = append(resultSuite.TestSuite, tSuite)
}
}
Expand Down