Skip to content

Commit

Permalink
fix test again
Browse files Browse the repository at this point in the history
  • Loading branch information
RaunakShah committed Nov 8, 2023
1 parent 2b93ddd commit 5f809cc
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pkg/sidecar-controller/snapshot_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,13 @@ func (ctrl *csiSnapshotSideCarController) updateSnapshotContentStatus(
updated := false
if contentObj.Status == nil {
newStatus = &crdv1.VolumeSnapshotContentStatus{
SnapshotHandle: &snapshotHandle,
ReadyToUse: &readyToUse,
CreationTime: &createdAt,
RestoreSize: &size,
VolumeGroupSnapshotHandle: &groupSnapshotID,
SnapshotHandle: &snapshotHandle,
ReadyToUse: &readyToUse,
CreationTime: &createdAt,
RestoreSize: &size,
}
if groupSnapshotID != "" {
newStatus.VolumeGroupSnapshotHandle = &groupSnapshotID
}
updated = true
} else {
Expand All @@ -455,7 +457,7 @@ func (ctrl *csiSnapshotSideCarController) updateSnapshotContentStatus(
newStatus.RestoreSize = &size
updated = true
}
if newStatus.VolumeGroupSnapshotHandle == nil {
if newStatus.VolumeGroupSnapshotHandle == nil && groupSnapshotID != "" {
newStatus.VolumeGroupSnapshotHandle = &groupSnapshotID
updated = true
}
Expand Down

0 comments on commit 5f809cc

Please sign in to comment.