Merge pull request #28469 from asalkeld/local-e2e

Automatic merge from submit-queue

Add detect-master to local provider to get e2e working

Make it possible to run some e2e tests using the local provider (./hack/local-up-cluster.sh)

This will now work for tests that don't need more than one node:
export  KUBERNETES_PROVIDER=local
go run hack/e2e.go -v -test --check_node_count=false --check_version_skew=false --test_args="--ginkgo.focus=Cadvisor"

Note: without this commit, the port and ip address are wrong and require the --host option (which is inconsistent with the other providers).
pull/6/head
Kubernetes Submit Queue 2016-09-11 05:44:47 -07:00 committed by GitHub
commit 8306fba9b0
2 changed files with 9 additions and 2 deletions

View File

@ -23,3 +23,10 @@ function detect-master {
export KUBE_MASTER_IP="127.0.0.1" export KUBE_MASTER_IP="127.0.0.1"
export KUBE_MASTER="localhost" export KUBE_MASTER="localhost"
} }
detect-master() {
KUBE_MASTER=localhost
KUBE_MASTER_IP=127.0.0.1
KUBE_MASTER_URL="http://${KUBE_MASTER_IP}:8080"
echo "Using master: $KUBE_MASTER (external IP: $KUBE_MASTER_IP)"
}

View File

@ -395,13 +395,13 @@ at a custom host directly:
```sh ```sh
export KUBECONFIG=/path/to/kubeconfig export KUBECONFIG=/path/to/kubeconfig
go run hack/e2e.go -v --test --check_node_count=false --test_args="--host=http://127.0.0.1:8080" go run hack/e2e.go -v --test --check_node_count=false
``` ```
To control the tests that are run: To control the tests that are run:
```sh ```sh
go run hack/e2e.go -v --test --check_node_count=false --test_args="--host=http://127.0.0.1:8080" --ginkgo.focus="Secrets" go run hack/e2e.go -v --test --check_node_count=false --test_args="--ginkgo.focus="Secrets"
``` ```
### Version-skewed and upgrade testing ### Version-skewed and upgrade testing