mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-05 19:21:37 +00:00
Updating test-go.sh to be able to run tests twice - for v1beta1 and 3
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user