From 60cd5095402772afca51c99eb96cc47dc8a7b0b0 Mon Sep 17 00:00:00 2001 From: Matthew Cary Date: Thu, 18 Mar 2021 12:34:38 -0700 Subject: [PATCH] Add option to test without labels --- test/k8s-integration/config/sc-standard-no-labels.yaml | 8 ++++++++ test/run-k8s-integration-ci.sh | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 test/k8s-integration/config/sc-standard-no-labels.yaml diff --git a/test/k8s-integration/config/sc-standard-no-labels.yaml b/test/k8s-integration/config/sc-standard-no-labels.yaml new file mode 100644 index 000000000..ab8d631f2 --- /dev/null +++ b/test/k8s-integration/config/sc-standard-no-labels.yaml @@ -0,0 +1,8 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: csi-gcepd +provisioner: pd.csi.storage.gke.io +parameters: + type: pd-standard +volumeBindingMode: WaitForFirstConsumer diff --git a/test/run-k8s-integration-ci.sh b/test/run-k8s-integration-ci.sh index 515376b91..583dd41a9 100755 --- a/test/run-k8s-integration-ci.sh +++ b/test/run-k8s-integration-ci.sh @@ -26,8 +26,15 @@ readonly teardown_driver=${GCE_PD_TEARDOWN_DRIVER:-true} readonly gke_node_version=${GKE_NODE_VERSION:-} readonly run_intree_plugin_tests=${RUN_INTREE_PLUGIN_TESTS:-false} readonly use_kubetest2=${USE_KUBETEST2:-false} +readonly test_pd_labels=${TEST_PD_LABELS:-true} -storage_classes=sc-standard.yaml,sc-balanced.yaml,sc-ssd.yaml +storage_classes=sc-balanced.yaml,sc-ssd.yaml + +if [[ $test_pd_labels = true ]] ; then + storage_classes=${storage_classes},sc-standard.yaml +else + storage_classes=${storage_classes},sc-standard-no-labels.yaml +fi if [[ -n $gce_region ]] ; then storage_classes="${storage_classes}",sc-regional.yaml