mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 18:28:13 +00:00 
			
		
		
		
	Workaround go-junit-report bug for TestApps
Blatant copy-pasta of 83ff8f2
			
			
This commit is contained in:
		| @@ -37,6 +37,8 @@ go_test( | |||||||
|     deps = [ |     deps = [ | ||||||
|         ":go_default_library", |         ":go_default_library", | ||||||
|         "//vendor/github.com/onsi/ginkgo:go_default_library", |         "//vendor/github.com/onsi/ginkgo:go_default_library", | ||||||
|  |         "//vendor/github.com/onsi/ginkgo/config:go_default_library", | ||||||
|  |         "//vendor/github.com/onsi/ginkgo/types:go_default_library", | ||||||
|         "//vendor/github.com/onsi/gomega:go_default_library", |         "//vendor/github.com/onsi/gomega:go_default_library", | ||||||
|     ], |     ], | ||||||
| ) | ) | ||||||
|   | |||||||
| @@ -17,13 +17,33 @@ limitations under the License. | |||||||
| package apps_test | package apps_test | ||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"testing" |  | ||||||
|  |  | ||||||
| 	. "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" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| func TestApps(t *testing.T) { | func TestApps(t *testing.T) { | ||||||
| 	RegisterFailHandler(Fail) | 	RegisterFailHandler(Fail) | ||||||
| 	RunSpecs(t, "Apps Suite") | 	RunSpecsWithDefaultAndCustomReporters(t, "Apps Suite", []Reporter{newlineReporter{}}) | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // 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") } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Aaron Crickenberger
					Aaron Crickenberger