[fix] fix update logic
Now controller will judge whether the storageClassClient need to send the update request. Signed-off-by: f10atin9 <f10atin9@kubesphere.io>
This commit is contained in:
@@ -235,14 +235,13 @@ func TestCreateStorageClass(t *testing.T) {
|
||||
func TestStorageClassHadAnnotation(t *testing.T) {
|
||||
fixture := newFixture(t, true)
|
||||
storageClass := newStorageClass("csi-example", "csi.example.com")
|
||||
storageClass.Annotations = map[string]string{annotationAllowSnapshot: "false", annotationAllowClone: "false"}
|
||||
storageClass.Annotations = make(map[string]string)
|
||||
storageClassUpdate := storageClass.DeepCopy()
|
||||
csiDriver := newCSIDriver("csi.example.com")
|
||||
storageClass.Annotations = map[string]string{annotationAllowSnapshot: "false", annotationAllowClone: "false"}
|
||||
|
||||
// Object exist
|
||||
fixture.storageObjects = append(fixture.storageObjects, storageClass)
|
||||
fixture.storageClassLister = append(fixture.storageClassLister, storageClass)
|
||||
fixture.csiDriverLister = append(fixture.csiDriverLister, csiDriver)
|
||||
|
||||
// Action expected
|
||||
fixture.expectUpdateStorageClassAction(storageClassUpdate)
|
||||
|
||||
Reference in New Issue
Block a user