pvc bind pv with vac

This commit is contained in:
carlory
2023-11-15 17:20:58 +08:00
parent 2ad04a0505
commit 3a6a4830df
12 changed files with 534 additions and 37 deletions

View File

@@ -3007,6 +3007,20 @@ func TestValidatePersistentVolumeClaimUpdate(t *testing.T) {
enableVolumeAttributesClass: true,
isExpectedFailure: true,
},
"invalid-update-volume-attributes-class-when-claim-not-bound": {
oldClaim: func() *core.PersistentVolumeClaim {
clone := validClaimVolumeAttributesClass1.DeepCopy()
clone.Status.Phase = core.ClaimPending
return clone
}(),
newClaim: func() *core.PersistentVolumeClaim {
clone := validClaimVolumeAttributesClass2.DeepCopy()
clone.Status.Phase = core.ClaimPending
return clone
}(),
enableVolumeAttributesClass: true,
isExpectedFailure: true,
},
"invalid-update-volume-attributes-class-to-nil-without-featuregate-enabled": {
oldClaim: validClaimVolumeAttributesClass1,
newClaim: validClaimNilVolumeAttributesClass,