@@ -86,7 +86,7 @@ configvar CSI_PROW_BUILD_PLATFORMS "linux amd64 amd64; linux ppc64le ppc64le -pp
8686#  which is disabled with GOFLAGS=-mod=vendor).
8787configvar GOFLAGS_VENDOR " $(  [ -d  vendor ] &&  echo  ' -mod=vendor'   ) "   " Go flags for using the vendor directory" 
8888
89- configvar CSI_PROW_GO_VERSION_BUILD " 1.18 "   " Go version for building the component"   #  depends on component's source code
89+ configvar CSI_PROW_GO_VERSION_BUILD " 1.19 "   " Go version for building the component"   #  depends on component's source code
9090configvar CSI_PROW_GO_VERSION_E2E " "   " override Go version for building the Kubernetes E2E test suite"   #  normally doesn't need to be set, see install_e2e
9191configvar CSI_PROW_GO_VERSION_SANITY " ${CSI_PROW_GO_VERSION_BUILD} "   " Go version for building the csi-sanity test suite"   #  depends on CSI_PROW_SANITY settings below
9292configvar CSI_PROW_GO_VERSION_KIND " ${CSI_PROW_GO_VERSION_BUILD} "   " Go version for building 'kind'"   #  depends on CSI_PROW_KIND_VERSION below
@@ -228,6 +228,9 @@ configvar CSI_PROW_E2E_VERSION "$(version_to_git "${CSI_PROW_KUBERNETES_VERSION}
228228configvar CSI_PROW_E2E_REPO " https://github.com/kubernetes/kubernetes"   " E2E repo" 
229229configvar CSI_PROW_E2E_IMPORT_PATH " k8s.io/kubernetes"   " E2E package" 
230230
231+ #  Local path for e2e tests. Set to "none" to disable.
232+ configvar CSI_PROW_SIDECAR_E2E_IMPORT_PATH " none"   " CSI Sidecar E2E package" 
233+ 
231234#  csi-sanity testing from the csi-test repo can be run against the installed
232235#  CSI driver. For this to work, deploying the driver must expose the Unix domain
233236#  csi.sock as a TCP service for use by the csi-sanity command, which runs outside
@@ -282,13 +285,18 @@ tests_enabled () {
282285sanity_enabled  () {
283286    [ " ${CSI_PROW_TESTS_SANITY} "   =  " sanity"   ] &&  tests_enabled " sanity" 
284287}
288+ 
289+ sidecar_tests_enabled  () {
290+   [ " ${CSI_PROW_SIDECAR_E2E_IMPORT_PATH} "   !=  " none"   ]
291+ }
292+ 
285293tests_need_kind  () {
286294    tests_enabled " parallel"   " serial"   " serial-alpha"   " parallel-alpha"   || 
287-         sanity_enabled
295+         sanity_enabled  ||  sidecar_tests_enabled 
288296}
289297tests_need_non_alpha_cluster  () {
290298    tests_enabled " parallel"   " serial"   || 
291-         sanity_enabled
299+         sanity_enabled  ||  sidecar_tests_enabled 
292300}
293301tests_need_alpha_cluster  () {
294302    tests_enabled " parallel-alpha"   " serial-alpha" 
@@ -352,6 +360,11 @@ configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_
352360configvar CSI_PROW_E2E_GATES_LATEST ' '   " non alpha feature gates for latest Kubernetes" 
353361configvar CSI_PROW_E2E_GATES " $( get_versioned_variable CSI_PROW_E2E_GATES " ${csi_prow_kubernetes_version_suffix} " ) "   " non alpha E2E feature gates" 
354362
363+ #  Focus for local tests run in the sidecar E2E repo. Only used if CSI_PROW_SIDECAR_E2E_IMPORT_PATH
364+ #  is not set to "none". If empty, all tests in the sidecar repo will be run.
365+ configvar CSI_PROW_SIDECAR_E2E_FOCUS ' '   " tags for local E2E tests" 
366+ configvar CSI_PROW_SIDECAR_E2E_SKIP ' '   " local tests that need to be skipped" 
367+ 
355368#  Which external-snapshotter tag to use for the snapshotter CRD and snapshot-controller deployment
356369default_csi_snapshotter_version  () {
357370	if  [ " ${CSI_PROW_KUBERNETES_VERSION} "   =  " latest"   ] ||  [ " ${CSI_PROW_DRIVER_CANARY} "   =  " canary"   ];  then 
@@ -368,7 +381,7 @@ configvar CSI_SNAPSHOTTER_VERSION "$(default_csi_snapshotter_version)" "external
368381#  whether they can run with the current cluster provider, but until
369382#  they are, we filter them out by name. Like the other test selection
370383#  variables, this is again a space separated list of regular expressions.
371- configvar CSI_PROW_E2E_SKIP ' Disruptive'   " tests that need to be skipped" 
384+ configvar CSI_PROW_E2E_SKIP ' \[ Disruptive\]|\[Feature:SELinux\] '   " tests that need to be skipped" 
372385
373386#  This creates directories that are required for testing.
374387ensure_paths  () {
@@ -942,6 +955,9 @@ install_e2e () {
942955        return  
943956    fi  
944957
958+     if  sidecar_tests_enabled;  then  
959+         run_with_go " ${CSI_PROW_GO_VERSION_BUILD} "   go test  -c -o " ${CSI_PROW_WORK} /e2e-local.test"   " ${CSI_PROW_SIDECAR_E2E_IMPORT_PATH} "  
960+     fi  
945961    git_checkout " ${CSI_PROW_E2E_REPO} "   " ${GOPATH} /src/${CSI_PROW_E2E_IMPORT_PATH} "   " ${CSI_PROW_E2E_VERSION} "   --depth=1 &&  
946962    if  [ " ${CSI_PROW_E2E_IMPORT_PATH} "   =  " k8s.io/kubernetes"   ];  then  
947963        patch_kubernetes " ${GOPATH} /src/${CSI_PROW_E2E_IMPORT_PATH} "   " ${CSI_PROW_WORK} "   &&  
@@ -997,8 +1013,13 @@ run_e2e () (
9971013    } 
9981014    trap  move_junit EXIT 
9991015
1000-     cd  " ${GOPATH} /src/${CSI_PROW_E2E_IMPORT_PATH} "   &&  
1001-     run_with_loggers env KUBECONFIG=" $KUBECONFIG "   KUBE_TEST_REPO_LIST=" $( if [ -e  " ${CSI_PROW_WORK} /e2e-repo-list"   ];  then  echo  " ${CSI_PROW_WORK} /e2e-repo-list" ;  fi) "   ginkgo -v " $@ "   " ${CSI_PROW_WORK} /e2e.test"   -- -report-dir " ${ARTIFACTS} "   -storage.testdriver=" ${CSI_PROW_WORK} /test-driver.yaml"  
1016+     if  [ " ${name} "   ==  " local"   ];  then  
1017+         cd  " ${GOPATH} /src/${CSI_PROW_SIDECAR_E2E_IMPORT_PATH} "   &&  
1018+         run_with_loggers env KUBECONFIG=" $KUBECONFIG "   KUBE_TEST_REPO_LIST=" $( if [ -e  " ${CSI_PROW_WORK} /e2e-repo-list"   ];  then  echo  " ${CSI_PROW_WORK} /e2e-repo-list" ;  fi) "   ginkgo -v " $@ "   " ${CSI_PROW_WORK} /e2e-local.test"   -- -report-dir " ${ARTIFACTS} "   -report-prefix local  
1019+     else  
1020+         cd  " ${GOPATH} /src/${CSI_PROW_E2E_IMPORT_PATH} "   &&  
1021+         run_with_loggers env KUBECONFIG=" $KUBECONFIG "   KUBE_TEST_REPO_LIST=" $( if [ -e  " ${CSI_PROW_WORK} /e2e-repo-list"   ];  then  echo  " ${CSI_PROW_WORK} /e2e-repo-list" ;  fi) "   ginkgo -v " $@ "   " ${CSI_PROW_WORK} /e2e.test"   -- -report-dir " ${ARTIFACTS} "   -storage.testdriver=" ${CSI_PROW_WORK} /test-driver.yaml"  
1022+     fi  
10021023) 
10031024
10041025#  Run csi-sanity against installed CSI driver.
@@ -1310,6 +1331,15 @@ main () {
13101331                        ret=1 
13111332                    fi  
13121333                fi  
1334+ 
1335+                 if  sidecar_tests_enabled;  then  
1336+                     if  !  run_e2e local  \ 
1337+                          -focus=" ${CSI_PROW_SIDECAR_E2E_FOCUS} "   \ 
1338+                          -skip=" $( regex_join " ${CSI_PROW_E2E_SERIAL} " ) " ;  then  
1339+                         warn " E2E sidecar failed"  
1340+                         ret=1 
1341+                     fi  
1342+                 fi  
13131343            fi  
13141344            delete_cluster_inside_prow_job non-alpha 
13151345        fi  
0 commit comments