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:
Filipe Brandenburger
2015-02-05 00:00:28 -08:00
parent 5de2e916e5
commit 7bb62cbfb3
10 changed files with 91 additions and 15 deletions

View File

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