Skip to content

Commit

Permalink
Conformance: remove labels from junit reporter output
Browse files Browse the repository at this point in the history
Signed-off-by: Brandon Mitchell <[email protected]>
  • Loading branch information
sudo-bmitch committed Apr 3, 2024
1 parent 75d2816 commit aa83cb4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion conformance/00_conformance_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

g "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/reporters"
. "github.com/onsi/gomega"
)

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

RegisterFailHandler(g.Fail)
suiteConfig, reporterConfig := g.GinkgoConfiguration()
reporterConfig.JUnitReport = reportJUnitFilename
hr := newHTMLReporter(reportHTMLFilename)
g.ReportAfterEach(hr.afterReport)
g.ReportAfterSuite("html custom reporter", func(r g.Report) {
if err := hr.endSuite(r); err != nil {
log.Printf("\nWARNING: cannot write HTML summary report: %v", err)
}
})
g.ReportAfterSuite("junit custom reporter", func(r g.Report) {
if reportJUnitFilename != "" {
_ = reporters.GenerateJUnitReportWithConfig(r, reportJUnitFilename, reporters.JunitReportConfig{
OmitLeafNodeType: true,
})
}
})
g.RunSpecs(t, "conformance tests", suiteConfig, reporterConfig)
}

0 comments on commit aa83cb4

Please sign in to comment.