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
This commit is contained in:
Patrick Ohly 2019-03-01 21:37:24 +01:00
parent 7514c49ec1
commit ef6f3e0a18

View File

@ -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"