From ef6f3e0a18e7dc803835e4de5c61382b03bc5a28 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 1 Mar 2019 21:37:24 +0100 Subject: [PATCH] test/e2e: fix `ginkgo ./test/e2e` When running ginkgo directly against the source code of the test suite instead of using some pre-compiled e2e.test binary, ginkgo no longer recognized that it runs a Ginkgo testsuite, which broke "-focus" and "-p". By re-inserting the magic strings that ginkgo looks for into a comment, we can restore the desired behavior without affecting the code. Fixes: #74827 --- test/e2e/e2e_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index e792a86f73d..065aeeb9907 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -22,6 +22,12 @@ import ( "os" "testing" + // Never, ever remove the line with "/ginkgo". Without it, + // the ginkgo test runner will not detect that this + // directory contains a Ginkgo test suite. + // See https://github.com/kubernetes/kubernetes/issues/74827 + // "github.com/onsi/ginkgo" + "k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/e2e/framework/testfiles" "k8s.io/kubernetes/test/e2e/framework/viperconfig"