mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-05 03:03:40 +00:00
Make e2e shell tests work standalone
Simply incorporate some of the boilerplate from hack/e2e.go into the scripts in hack/e2e-suite. Use environment variables with default values to allow overrides in kubectl command line and to use a versioned package root. Tested: - Ran `go run hack/e2e.go -test` on a test cluster. - Ran the test cases individually. - Ran hack/e2e-suite/goe2e.sh -t Pods to confirm it takes arguments. - Also fixed cluster/test-network.sh (which should be more and more irrelevant.)
This commit is contained in:
@@ -137,9 +137,12 @@ func main() {
|
||||
log.Fatalf("Error preparing a binary of version %s: %s. Aborting.", *version, err)
|
||||
} else {
|
||||
versionRoot = newVersionRoot
|
||||
os.Setenv("KUBE_VERSION_ROOT", newVersionRoot)
|
||||
}
|
||||
}
|
||||
|
||||
os.Setenv("KUBECTL", versionRoot+`/cluster/kubectl.sh`+kubectlArgs())
|
||||
|
||||
if *pushup {
|
||||
if IsUp() {
|
||||
log.Printf("e2e cluster is up, pushing.")
|
||||
|
Reference in New Issue
Block a user