Adding test case for updating default class to new driver

This commit is contained in:
Shawn Hurley
2022-04-01 12:46:36 -04:00
parent 27f8d3fe72
commit 689a875bfc
2 changed files with 48 additions and 2 deletions

View File

@@ -265,8 +265,8 @@ func decideSnapshotClassV1(snapClass, oldSnapClass *volumesnapshotv1.VolumeSnaps
return reviewResponse
}
// If Old snapshot class has this, then we can assume that it was validated
if oldSnapClass.Annotations[utils.IsDefaultSnapshotClassAnnotation] == "true" {
// If Old snapshot class has this, then we can assume that it was validated if driver is the same.
if oldSnapClass.Annotations[utils.IsDefaultSnapshotClassAnnotation] == "true" && oldSnapClass.Driver == snapClass.Driver {
return reviewResponse
}