mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 05:30:26 +00:00
Revert "Use native Ginkgo test runner instead of cmd/e2e"
This commit is contained in:
@@ -22,19 +22,20 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
"path/filepath"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
)
|
||||
|
||||
var (
|
||||
root = kubeRootOrDie()
|
||||
root = absOrDie(filepath.Clean(filepath.Join(path.Base(os.Args[0]), "..")))
|
||||
)
|
||||
|
||||
var _ = Describe("Shell", func() {
|
||||
|
||||
defer GinkgoRecover()
|
||||
// Slurp up all the tests in hack/e2e-suite
|
||||
// This should be using testContext.RepoRoot, but this is evaluated before flags are evaluated, so we are stuck.
|
||||
bashE2ERoot := filepath.Join(root, "hack/e2e-suite")
|
||||
files, err := ioutil.ReadDir(bashE2ERoot)
|
||||
if err != nil {
|
||||
@@ -55,13 +56,8 @@ var _ = Describe("Shell", func() {
|
||||
}
|
||||
})
|
||||
|
||||
// Returns the root directory of the Kubernetes source tree, assuming the test lives inside test/e2e.
|
||||
func kubeRootOrDie() string {
|
||||
cwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
out, err := filepath.Abs(filepath.Join(cwd, "..", ".."))
|
||||
func absOrDie(path string) string {
|
||||
out, err := filepath.Abs(path)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user