4747 // Test infrastructure flags
4848 boskosResourceType = flag .String ("boskos-resource-type" , "gce-project" , "name of the boskos resource type to reserve" )
4949 storageClassFile = flag .String ("storageclass-file" , "" , "name of storageclass yaml file to use for test relative to test/k8s-integration/config" )
50+ snapshotClassFile = flag .String ("snapshotclass-file" , "" , "name of snapshotclass yaml file to use for test relative to test/k8s-integration/config" )
5051 inProw = flag .Bool ("run-in-prow" , false , "is the test running in PROW" )
5152
5253 // Driver flags
@@ -300,10 +301,9 @@ func handle() error {
300301 }
301302
302303 testSkip := generateTestSkip (normalizedVersion )
303-
304304 // Run the tests using the testDir kubernetes
305305 if len (* storageClassFile ) != 0 {
306- err = runCSITests (pkgDir , testDir , * testFocus , testSkip , * storageClassFile , cloudProviderArgs , * deploymentStrat )
306+ err = runCSITests (pkgDir , testDir , * testFocus , testSkip , * storageClassFile , * snapshotClassFile , cloudProviderArgs , * deploymentStrat )
307307 } else if * migrationTest {
308308 err = runMigrationTests (pkgDir , testDir , * testFocus , testSkip , cloudProviderArgs )
309309 } else {
@@ -318,7 +318,7 @@ func handle() error {
318318}
319319
320320func generateTestSkip (normalizedVersion string ) string {
321- skipString := "\\ [Disruptive\\ ]|\\ [Serial\\ ]| \\ [Feature:.+ \\ ] "
321+ skipString := "\\ [Disruptive\\ ]|\\ [Serial\\ ]"
322322 switch normalizedVersion {
323323 // Fall-through versioning since all test cases we want to skip in 1.15
324324 // should also be skipped in 1.14
@@ -333,6 +333,8 @@ func generateTestSkip(normalizedVersion string) string {
333333 // bug-fix introduced in 1.17
334334 // (https://github.com/kubernetes/kubernetes/pull/81163)
335335 skipString = skipString + "|volumeMode\\ sshould\\ snot\\ smount\\ s/\\ smap\\ sunused\\ svolumes\\ sin\\ sa\\ spod"
336+ // Skip Snapshot tests pre 1.17
337+ skipString = skipString + "|snapshot"
336338 fallthrough
337339 case "1.17" :
338340 case "latest" :
@@ -359,8 +361,8 @@ func runMigrationTests(pkgDir, testDir, testFocus, testSkip string, cloudProvide
359361 return runTestsWithConfig (testDir , testFocus , testSkip , "--storage.migratedPlugins=kubernetes.io/gce-pd" , cloudProviderArgs )
360362}
361363
362- func runCSITests (pkgDir , testDir , testFocus , testSkip , storageClassFile string , cloudProviderArgs []string , deploymentStrat string ) error {
363- testDriverConfigFile , err := generateDriverConfigFile (pkgDir , storageClassFile , deploymentStrat )
364+ func runCSITests (pkgDir , testDir , testFocus , testSkip , storageClassFile , snapshotClassFile string , cloudProviderArgs []string , deploymentStrat string ) error {
365+ testDriverConfigFile , err := generateDriverConfigFile (pkgDir , storageClassFile , snapshotClassFile , deploymentStrat )
364366 if err != nil {
365367 return err
366368 }
0 commit comments