From d0eec8511c59991204f93dcad5854a2005fba985 Mon Sep 17 00:00:00 2001 From: Brandon Mitchell Date: Wed, 3 Apr 2024 15:53:50 -0400 Subject: [PATCH] Conformance: remove labels from junit reporter output Signed-off-by: Brandon Mitchell --- conformance/00_conformance_suite_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/conformance/00_conformance_suite_test.go b/conformance/00_conformance_suite_test.go index f20d68d5..7a7366b5 100644 --- a/conformance/00_conformance_suite_test.go +++ b/conformance/00_conformance_suite_test.go @@ -5,6 +5,7 @@ import ( "testing" g "github.com/onsi/ginkgo/v2" + "github.com/onsi/ginkgo/v2/reporters" . "github.com/onsi/gomega" ) @@ -18,7 +19,6 @@ 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) { @@ -26,5 +26,12 @@ func TestConformance(t *testing.T) { 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) }