Skip to content

Commit 6d12f2d

Browse files
committed
storage: fix CSIInlineVolume round-trip test
When adding CSIDriver.Spec.VolumeLifecycleModes, the defaulting in pkg/apis/storage/fuzzer/fuzzer.go did not quite match the one from pkg/apis/storage/v1beta1/defaults.go, causing a test failure when the corresponding feature gate is enabled.
1 parent 3972485 commit 6d12f2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/apis/storage/fuzzer/fuzzer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
7878
obj.Spec.PodInfoOnMount = new(bool)
7979
*(obj.Spec.PodInfoOnMount) = false
8080
}
81-
if obj.Spec.VolumeLifecycleModes == nil {
81+
if len(obj.Spec.VolumeLifecycleModes) == 0 {
8282
obj.Spec.VolumeLifecycleModes = []storage.VolumeLifecycleMode{
8383
storage.VolumeLifecyclePersistent,
8484
}

0 commit comments

Comments
 (0)