Skip to content

Commit

Permalink
Merge pull request #99 from christophd/issue/98/fix-junit-reports
Browse files Browse the repository at this point in the history
fix(#98): Fix JUnit report XML generation
  • Loading branch information
christophd authored Apr 30, 2020
2 parents d5b39da + 0edc1ba commit 8e1b545
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/report/junit.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ func createJUnitReport(results *v1alpha1.TestResults, outputDir string) (string,

// need to workaround marshalling in order to overwrite local element name of root element
tmp := struct {
TestSuite
XMLName struct{} `xml:"testsuite"`
}{TestSuite: report.Suite}
JUnitReport
XMLName struct{} `xml:"testsuites"`
}{JUnitReport: report}
if bytes, err := xml.MarshalIndent(tmp,"", " "); err == nil {
junitReport := XmlProcessingInstruction + string(bytes)

Expand Down

0 comments on commit 8e1b545

Please sign in to comment.