diff --git a/controllers/tests/cruisecontroltask_controller_test.go b/controllers/tests/cruisecontroltask_controller_test.go index 6e38f20fb..b03b3bc70 100644 --- a/controllers/tests/cruisecontroltask_controller_test.go +++ b/controllers/tests/cruisecontroltask_controller_test.go @@ -122,7 +122,7 @@ var _ = Describe("CruiseControlTaskReconciler", func() { return false } volumeState, ok := brokerState.GracefulActionState.VolumeStates[mountPath] - if !ok { + if !ok || volumeState.CruiseControlOperationReference == nil { return false } @@ -202,7 +202,7 @@ var _ = Describe("CruiseControlTaskReconciler", func() { return false } volumeState, ok := brokerState.GracefulActionState.VolumeStates[mountPath] - if !ok { + if !ok || volumeState.CruiseControlOperationReference == nil { return false } @@ -286,7 +286,7 @@ var _ = Describe("CruiseControlTaskReconciler", func() { return false } volumeState, ok := brokerState.GracefulActionState.VolumeStates[mountPath] - if !ok { + if !ok || volumeState.CruiseControlOperationReference == nil { return false }