Remove `newlineReporter` custom report
The `newlineReporter` intends to print a new line after the test to prevent the something print to the stdout and mess up the test result while cause the tool like `go-junit-report` fail to parse the result. But this is no longer needed based on following evidence. - The issue that was first introduced in `go-junit-report` has already fixed in the version referenced in `go.mod`. - The `newlineReporter` report doesn't fix anything for `Ginkgo` v1 or V2 or `go test`, it just prints a new line before the test summarization. Signed-off-by: Dave Chen <dave.chen@arm.com> Kubernetes-commit: 9953dde65dfaede9f1d481296053adc301ad9773
This commit is contained in:
parent
bdd48ac8f1
commit
e0318c203f
|
@ -18,32 +18,12 @@ package parse_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/ginkgo/config"
|
|
||||||
. "github.com/onsi/ginkgo/types"
|
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"fmt"
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestApplyParse(t *testing.T) {
|
func TestApplyParse(t *testing.T) {
|
||||||
RegisterFailHandler(Fail)
|
RegisterFailHandler(Fail)
|
||||||
RunSpecsWithDefaultAndCustomReporters(t, "Apply Parse Suite", []Reporter{newlineReporter{}})
|
RunSpecs(t, "Apply Parse Suite")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print a newline after the default newlineReporter due to issue
|
|
||||||
// https://github.com/jstemmer/go-junit-report/issues/31
|
|
||||||
type newlineReporter struct{}
|
|
||||||
|
|
||||||
func (newlineReporter) SpecSuiteWillBegin(config GinkgoConfigType, summary *SuiteSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) BeforeSuiteDidRun(setupSummary *SetupSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) AfterSuiteDidRun(setupSummary *SetupSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) SpecWillRun(specSummary *SpecSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) SpecDidComplete(specSummary *SpecSummary) {}
|
|
||||||
|
|
||||||
// SpecSuiteDidEnd Prints a newline between "35 Passed | 0 Failed | 0 Pending | 0 Skipped" and "--- PASS:"
|
|
||||||
func (newlineReporter) SpecSuiteDidEnd(summary *SuiteSummary) { fmt.Printf("\n") }
|
|
||||||
|
|
|
@ -18,32 +18,12 @@ package strategy_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/ginkgo/config"
|
|
||||||
. "github.com/onsi/ginkgo/types"
|
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"fmt"
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStrategy(t *testing.T) {
|
func TestStrategy(t *testing.T) {
|
||||||
RegisterFailHandler(Fail)
|
RegisterFailHandler(Fail)
|
||||||
RunSpecsWithDefaultAndCustomReporters(t, "Apply Strategy Suite", []Reporter{newlineReporter{}})
|
RunSpecs(t, "Apply Strategy Suite")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print a newline after the default newlineReporter due to issue
|
|
||||||
// https://github.com/jstemmer/go-junit-report/issues/31
|
|
||||||
type newlineReporter struct{}
|
|
||||||
|
|
||||||
func (newlineReporter) SpecSuiteWillBegin(config GinkgoConfigType, summary *SuiteSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) BeforeSuiteDidRun(setupSummary *SetupSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) AfterSuiteDidRun(setupSummary *SetupSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) SpecWillRun(specSummary *SpecSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) SpecDidComplete(specSummary *SpecSummary) {}
|
|
||||||
|
|
||||||
// SpecSuiteDidEnd Prints a newline between "35 Passed | 0 Failed | 0 Pending | 0 Skipped" and "--- PASS:"
|
|
||||||
func (newlineReporter) SpecSuiteDidEnd(summary *SuiteSummary) { fmt.Printf("\n") }
|
|
||||||
|
|
|
@ -18,32 +18,12 @@ package apps
|
||||||
|
|
||||||
import (
|
import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/ginkgo/config"
|
|
||||||
. "github.com/onsi/ginkgo/types"
|
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"fmt"
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestApps(t *testing.T) {
|
func TestApps(t *testing.T) {
|
||||||
RegisterFailHandler(Fail)
|
RegisterFailHandler(Fail)
|
||||||
RunSpecsWithDefaultAndCustomReporters(t, "Apps Suite", []Reporter{newlineReporter{}})
|
RunSpecs(t, "Apps Suite")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print a newline after the default newlineReporter due to issue
|
|
||||||
// https://github.com/jstemmer/go-junit-report/issues/31
|
|
||||||
type newlineReporter struct{}
|
|
||||||
|
|
||||||
func (newlineReporter) SpecSuiteWillBegin(config GinkgoConfigType, summary *SuiteSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) BeforeSuiteDidRun(setupSummary *SetupSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) AfterSuiteDidRun(setupSummary *SetupSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) SpecWillRun(specSummary *SpecSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) SpecDidComplete(specSummary *SpecSummary) {}
|
|
||||||
|
|
||||||
// SpecSuiteDidEnd Prints a newline between "35 Passed | 0 Failed | 0 Pending | 0 Skipped" and "--- PASS:"
|
|
||||||
func (newlineReporter) SpecSuiteDidEnd(summary *SuiteSummary) { fmt.Printf("\n") }
|
|
||||||
|
|
|
@ -18,32 +18,12 @@ package openapi_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/ginkgo/config"
|
|
||||||
. "github.com/onsi/ginkgo/types"
|
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"fmt"
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestOpenapi(t *testing.T) {
|
func TestOpenapi(t *testing.T) {
|
||||||
RegisterFailHandler(Fail)
|
RegisterFailHandler(Fail)
|
||||||
RunSpecsWithDefaultAndCustomReporters(t, "Openapi Suite", []Reporter{newlineReporter{}})
|
RunSpecs(t, "Openapi Suite")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print a newline after the default newlineReporter due to issue
|
|
||||||
// https://github.com/jstemmer/go-junit-report/issues/31
|
|
||||||
type newlineReporter struct{}
|
|
||||||
|
|
||||||
func (newlineReporter) SpecSuiteWillBegin(config GinkgoConfigType, summary *SuiteSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) BeforeSuiteDidRun(setupSummary *SetupSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) AfterSuiteDidRun(setupSummary *SetupSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) SpecWillRun(specSummary *SpecSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) SpecDidComplete(specSummary *SpecSummary) {}
|
|
||||||
|
|
||||||
// SpecSuiteDidEnd Prints a newline between "35 Passed | 0 Failed | 0 Pending | 0 Skipped" and "--- PASS:"
|
|
||||||
func (newlineReporter) SpecSuiteDidEnd(summary *SuiteSummary) { fmt.Printf("\n") }
|
|
||||||
|
|
|
@ -18,32 +18,12 @@ package validation
|
||||||
|
|
||||||
import (
|
import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/ginkgo/config"
|
|
||||||
. "github.com/onsi/ginkgo/types"
|
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"fmt"
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestOpenapiValidation(t *testing.T) {
|
func TestOpenapiValidation(t *testing.T) {
|
||||||
RegisterFailHandler(Fail)
|
RegisterFailHandler(Fail)
|
||||||
RunSpecsWithDefaultAndCustomReporters(t, "Openapi Validation Suite", []Reporter{newlineReporter{}})
|
RunSpecs(t, "Openapi Validation Suite")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print a newline after the default newlineReporter due to issue
|
|
||||||
// https://github.com/jstemmer/go-junit-report/issues/31
|
|
||||||
type newlineReporter struct{}
|
|
||||||
|
|
||||||
func (newlineReporter) SpecSuiteWillBegin(config GinkgoConfigType, summary *SuiteSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) BeforeSuiteDidRun(setupSummary *SetupSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) AfterSuiteDidRun(setupSummary *SetupSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) SpecWillRun(specSummary *SpecSummary) {}
|
|
||||||
|
|
||||||
func (newlineReporter) SpecDidComplete(specSummary *SpecSummary) {}
|
|
||||||
|
|
||||||
// SpecSuiteDidEnd Prints a newline between "35 Passed | 0 Failed | 0 Pending | 0 Skipped" and "--- PASS:"
|
|
||||||
func (newlineReporter) SpecSuiteDidEnd(summary *SuiteSummary) { fmt.Printf("\n") }
|
|
||||||
|
|
Loading…
Reference in New Issue