Skip to content

Commit 22b48c4

Browse files
committed
Skip disk image tests before 1.21
Change-Id: I1fedd3a23dac6312d5eccb7de13cec6df3f6734f
1 parent 7a126c2 commit 22b48c4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/k8s-integration/main.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,12 @@ func handle() error {
478478
return fmt.Errorf("Unknown deployment strategy %s", testParams.deploymentStrategy)
479479
}
480480

481+
skipDiskImageSnapshots := false
482+
if mustParseVersion(testParams.clusterVersion).lessThan(mustParseVersion("1.22.0")) {
483+
// Disk image cloning in only supported from 1.22 on.
484+
skipDiskImageSnapshots = true
485+
}
486+
481487
// Run the tests using the k8sSourceDir kubernetes
482488
if len(*storageClassFiles) != 0 {
483489
applicableStorageClassFiles := []string{}
@@ -498,6 +504,9 @@ func handle() error {
498504
}
499505
for _, rawSnapshotClassFile := range strings.Split(*snapshotClassFiles, ",") {
500506
snapshotClassFile := strings.TrimSpace(rawSnapshotClassFile)
507+
if skipDiskImageSnapshots && strings.Contains(snapshotClassFile, "image-volumesnapshotclass") {
508+
continue
509+
}
501510
if len(snapshotClassFile) != 0 {
502511
applicableSnapshotClassFiles = append(applicableSnapshotClassFiles, snapshotClassFile)
503512
}

0 commit comments

Comments
 (0)