Updating test-go.sh to be able to run tests twice - for v1beta1 and 3

This commit is contained in:
nikhiljindal
2015-03-19 17:21:08 -07:00
parent f584069573
commit 5e4ab8e045
3 changed files with 116 additions and 84 deletions

View File

@@ -24,6 +24,9 @@ set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
source "${KUBE_ROOT}/hack/lib/init.sh"
# Comma separated list of API Versions that should be tested.
KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1beta1,v1beta3"}
cleanup() {
kube::etcd::cleanup
@@ -36,6 +39,7 @@ runTests() {
kube::log::status "Running integration test cases"
KUBE_GOFLAGS="-tags 'integration no-docker' " \
KUBE_RACE="-race" \
KUBE_TEST_API_VERSIONS="$1" \
"${KUBE_ROOT}/hack/test-go.sh" test/integration
kube::log::status "Running integration test scenario"
@@ -50,5 +54,8 @@ runTests() {
# Run cleanup to stop etcd on interrupt or other kill signal.
trap cleanup EXIT
runTests "v1beta1"
runTests "v1beta3"
# Convert the CSV to an array of API versions to test
IFS=',' read -a apiVersions <<< ${KUBE_TEST_API_VERSIONS}
for apiVersion in "${apiVersions[@]}"; do
runTests $apiVersion
done