Skip to content

Commit 81bb239

Browse files
authored
Merge pull request #534 from sudo-bmitch/pr-junit-reporter
Conformance: remove labels from junit reporter output
2 parents 67a9d9e + aa83cb4 commit 81bb239

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

conformance/00_conformance_suite_test.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"testing"
66

77
g "github.com/onsi/ginkgo/v2"
8+
"github.com/onsi/ginkgo/v2/reporters"
89
. "github.com/onsi/gomega"
910
)
1011

@@ -18,13 +19,19 @@ func TestConformance(t *testing.T) {
1819

1920
RegisterFailHandler(g.Fail)
2021
suiteConfig, reporterConfig := g.GinkgoConfiguration()
21-
reporterConfig.JUnitReport = reportJUnitFilename
2222
hr := newHTMLReporter(reportHTMLFilename)
2323
g.ReportAfterEach(hr.afterReport)
2424
g.ReportAfterSuite("html custom reporter", func(r g.Report) {
2525
if err := hr.endSuite(r); err != nil {
2626
log.Printf("\nWARNING: cannot write HTML summary report: %v", err)
2727
}
2828
})
29+
g.ReportAfterSuite("junit custom reporter", func(r g.Report) {
30+
if reportJUnitFilename != "" {
31+
_ = reporters.GenerateJUnitReportWithConfig(r, reportJUnitFilename, reporters.JunitReportConfig{
32+
OmitLeafNodeType: true,
33+
})
34+
}
35+
})
2936
g.RunSpecs(t, "conformance tests", suiteConfig, reporterConfig)
3037
}

0 commit comments

Comments
 (0)