Skip to content

Commit 05d58e2

Browse files
author
Ish Shah
authored
Add UniqueID to XML Output (#5092)
1 parent 1979f73 commit 05d58e2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
entries:
2+
- description: >
3+
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.
4+
kind: "addition"
5+
breaking: false

internal/cmd/operator-sdk/scorecard/cmd.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,11 @@ func (c *scorecardCmd) convertXunit(output v1alpha3.TestList) xunit.TestSuites {
142142
}
143143
tSuite.TestCases = append(tSuite.TestCases, tCase)
144144
tSuite.URL = item.Spec.Image
145-
//TODO: Add TestStuite ID when API updates version
146-
//tSuite.ID = item.Spec.UniqueID
145+
if item.Spec.UniqueID != "" {
146+
tSuite.ID = item.Spec.UniqueID
147+
} else {
148+
tSuite.ID = res.Name
149+
}
147150
resultSuite.TestSuite = append(resultSuite.TestSuite, tSuite)
148151
}
149152
}

0 commit comments

Comments
 (0)