@@ -105,10 +105,7 @@ func (c *scorecardCmd) printOutput(output v1alpha3.TestList) error {
105
105
}
106
106
fmt .Printf ("%s\n " , string (bytes ))
107
107
case "xunit" :
108
- xunitOutput , err := c .convertXunit (output )
109
- if err != nil {
110
- return fmt .Errorf ("xunit conversion error: %v" , err )
111
- }
108
+ xunitOutput := c .convertXunit (output )
112
109
bytes , err := xml .MarshalIndent (xunitOutput , "" , " " )
113
110
if err != nil {
114
111
return fmt .Errorf ("marshal xml error: %v" , err )
@@ -175,7 +172,7 @@ type xUnitComplexSkipped struct {
175
172
Message string `json:"message,omitempty"`
176
173
}
177
174
178
- func (c * scorecardCmd ) convertXunit (output v1alpha3.TestList ) ( TestSuites , error ) {
175
+ func (c * scorecardCmd ) convertXunit (output v1alpha3.TestList ) TestSuites {
179
176
var resultSuite TestSuites
180
177
resultSuite .Name = "scorecard"
181
178
resultSuite .Tests = ""
@@ -199,11 +196,12 @@ func (c *scorecardCmd) convertXunit(output v1alpha3.TestList) (TestSuites, error
199
196
}
200
197
tSuite .TestCases = append (tSuite .TestCases , tCase )
201
198
tSuite .URL = item .Spec .Image
199
+ //TODO: Add TestStuite ID when API updates version
202
200
//tSuite.ID = item.Spec.UniqueID
203
201
}
204
202
}
205
203
206
- return resultSuite , nil
204
+ return resultSuite
207
205
}
208
206
209
207
func (c * scorecardCmd ) run () (err error ) {
0 commit comments