47
47
// Test infrastructure flags
48
48
boskosResourceType = flag .String ("boskos-resource-type" , "gce-project" , "name of the boskos resource type to reserve" )
49
49
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" )
50
51
inProw = flag .Bool ("run-in-prow" , false , "is the test running in PROW" )
51
52
52
53
// Driver flags
@@ -300,10 +301,9 @@ func handle() error {
300
301
}
301
302
302
303
testSkip := generateTestSkip (normalizedVersion )
303
-
304
304
// Run the tests using the testDir kubernetes
305
305
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 )
307
307
} else if * migrationTest {
308
308
err = runMigrationTests (pkgDir , testDir , * testFocus , testSkip , cloudProviderArgs )
309
309
} else {
@@ -318,7 +318,7 @@ func handle() error {
318
318
}
319
319
320
320
func generateTestSkip (normalizedVersion string ) string {
321
- skipString := "\\ [Disruptive\\ ]|\\ [Serial\\ ]| \\ [Feature:.+ \\ ] "
321
+ skipString := "\\ [Disruptive\\ ]|\\ [Serial\\ ]"
322
322
switch normalizedVersion {
323
323
// Fall-through versioning since all test cases we want to skip in 1.15
324
324
// should also be skipped in 1.14
@@ -333,6 +333,8 @@ func generateTestSkip(normalizedVersion string) string {
333
333
// bug-fix introduced in 1.17
334
334
// (https://github.com/kubernetes/kubernetes/pull/81163)
335
335
skipString = skipString + "|volumeMode\\ sshould\\ snot\\ smount\\ s/\\ smap\\ sunused\\ svolumes\\ sin\\ sa\\ spod"
336
+ // Skip Snapshot tests pre 1.17
337
+ skipString = skipString + "|snapshot"
336
338
fallthrough
337
339
case "1.17" :
338
340
case "latest" :
@@ -359,8 +361,8 @@ func runMigrationTests(pkgDir, testDir, testFocus, testSkip string, cloudProvide
359
361
return runTestsWithConfig (testDir , testFocus , testSkip , "--storage.migratedPlugins=kubernetes.io/gce-pd" , cloudProviderArgs )
360
362
}
361
363
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 )
364
366
if err != nil {
365
367
return err
366
368
}
0 commit comments