Add /version to server and check it in client.

Will help detect client/version skew and prevent e2e test from passing
while running a version other than the one you think it's running.
This commit is contained in:
Daniel Smith
2014-07-25 12:28:20 -07:00
parent 9fc52c8aaa
commit 3b8488028d
9 changed files with 148 additions and 31 deletions

View File

@@ -39,7 +39,7 @@ set -e
# Use testing config
export KUBE_CONFIG_FILE="config-test.sh"
export KUBE_REPO_ROOT="$(dirname $0)/.."
export CLOUDCFG="${KUBE_REPO_ROOT}/cluster/kubecfg.sh"
export CLOUDCFG="${KUBE_REPO_ROOT}/cluster/kubecfg.sh -expect_version_match"
# Build a release required by the test provider [if any]
test-build-release

View File

@@ -106,7 +106,7 @@ APISERVER_PID=$!
wait_for_url "http://127.0.0.1:${API_PORT}/healthz" "apiserver: "
KUBE_CMD="${GO_OUT}/kubecfg -h http://127.0.0.1:${API_PORT}"
KUBE_CMD="${GO_OUT}/kubecfg -h http://127.0.0.1:${API_PORT} -expect_version_match"
${KUBE_CMD} list pods
echo "kubecfg(pods): ok"
@@ -130,4 +130,4 @@ echo "kubecfg(minions): ok"
#PROXY_LOG=/tmp/kube-proxy.log
#${GO_OUT}/proxy \
# --etcd_servers="http://127.0.0.1:${ETCD_PORT}" 1>&2 &
#PROXY_PID=$!
#PROXY_PID=$!