Skip to content

Commit 965ba6a

Browse files
authored
Merge pull request kubernetes-sigs#329 from davidz627/fix/migrationTests
Use new deployment strategy and version flags for k8s integration migration tests
2 parents 5aed73c + 88f2e4e commit 965ba6a

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

test/run-k8s-integration-migration-local.sh

+8-3
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,26 @@ readonly PKGDIR=${GOPATH}/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver
77
readonly GCE_PD_TEST_FOCUS="\s[V|v]olume\sexpand|\[sig-storage\]\sIn-tree\sVolumes\s\[Driver:\sgcepd\]\s\[Testpattern:\sDynamic\sPV|allowedTopologies|Pod\sDisks|PersistentVolumes\sDefault"
88
source "${PKGDIR}/deploy/common.sh"
99

10+
readonly kube_version=${GCE_PD_KUBE_VERSION:-master}
11+
readonly test_version=${TEST_VERSION:-master}
12+
1013
ensure_var GCE_PD_CSI_STAGING_IMAGE
1114
ensure_var GCE_PD_SA_DIR
1215

1316
make -C ${PKGDIR} test-k8s-integration
17+
1418
${PKGDIR}/bin/k8s-integration-test --kube-version=master --run-in-prow=false \
1519
--staging-image=${GCE_PD_CSI_STAGING_IMAGE} --service-account-file=${GCE_PD_SA_DIR}/cloud-sa.json \
1620
--deploy-overlay-name=dev --test-focus=${GCE_PD_TEST_FOCUS} \
17-
--kube-feature-gates="CSIMigration=true,CSIMigrationGCE=true" --migration-test=true --gce-zone="us-central1-b"
21+
--kube-feature-gates="CSIMigration=true,CSIMigrationGCE=true" --migration-test=true --gce-zone="us-central1-b" \
22+
--deployment-strategy=gce --test-version=${test_version}
1823

1924
# This version of the command does not build the driver or K8s, points to a
2025
# local K8s repo to get the e2e.test binary, and does not bring up or down the cluster
2126
#
2227
# ensure_var GCE_PD_ZONE
23-
# ${PKGDIR}/bin/k8s-integration-test --kube-version=master --run-in-prow=false \
28+
# ${PKGDIR}/bin/k8s-integration-test --run-in-prow=false \
2429
# --staging-image=${GCE_PD_CSI_STAGING_IMAGE} --service-account-file=${GCE_PD_SA_DIR}/cloud-sa.json \
2530
# --deploy-overlay-name=dev --test-focus=${GCE_PD_TEST_FOCUS} \
2631
# --bringup-cluster=false --teardown-cluster=false --local-k8s-dir=$KTOP --migration-test=true \
27-
# --do-driver-build=true --gce-zone=${GCE_PD_ZONE}
32+
# --do-driver-build=true --gce-zone=${GCE_PD_ZONE}

test/run-k8s-integration-migration.sh

+10-3
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@
99
set -o nounset
1010
set -o errexit
1111

12+
export GCE_PD_VERBOSITY=9
13+
1214
readonly PKGDIR=${GOPATH}/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver
15+
1316
readonly overlay_name="${GCE_PD_OVERLAY_NAME:-stable}"
1417
readonly boskos_resource_type="${GCE_PD_BOSKOS_RESOURCE_TYPE:-gce-project}"
1518
readonly do_driver_build="${GCE_PD_DO_DRIVER_BUILD:-true}"
16-
export GCE_PD_VERBOSITY=9
19+
readonly deployment_strategy=${DEPLOYMENT_STRATEGY:-gce}
20+
readonly kube_version=${GCE_PD_KUBE_VERSION:-master}
21+
readonly test_version=${TEST_VERSION:-master}
22+
1723
readonly GCE_PD_TEST_FOCUS="\s[V|v]olume\sexpand|\[sig-storage\]\sIn-tree\sVolumes\s\[Driver:\sgcepd\]\s\[Testpattern:\sDynamic\sPV|allowedTopologies|Pod\sDisks|PersistentVolumes\sDefault"
1824

25+
1926
# TODO(#167): Enable reconstructions tests
2027
# TODO: Enabled inline volume tests
2128
# TODO: Fix and enable the following tests. They all exhibit the same testing infra error:
@@ -26,9 +33,9 @@ readonly GCE_PD_TEST_FOCUS="\s[V|v]olume\sexpand|\[sig-storage\]\sIn-tree\sVolum
2633
# ("us-central1-b"), but disk name is empty"
2734

2835
make -C ${PKGDIR} test-k8s-integration
29-
${PKGDIR}/bin/k8s-integration-test --kube-version=${GCE_PD_KUBE_VERSION:-master} \
36+
${PKGDIR}/bin/k8s-integration-test --kube-version=${kube_version} \
3037
--kube-feature-gates="CSIMigration=true,CSIMigrationGCE=true" --run-in-prow=true \
3138
--deploy-overlay-name=${overlay_name} --service-account-file=${E2E_GOOGLE_APPLICATION_CREDENTIALS} \
3239
--do-driver-build=${do_driver_build} --boskos-resource-type=${boskos_resource_type} \
3340
--migration-test=true --test-focus=${GCE_PD_TEST_FOCUS} \
34-
--gce-zone="us-central1-b"
41+
--gce-zone="us-central1-b" --deployment-strategy=${deployment_strategy} --test-version=${test_version}

0 commit comments

Comments
 (0)