Skip to content

Commit

Permalink
chore: checking for mutatePV error
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardomaraschini committed Feb 16, 2023
1 parent fb7d619 commit 27cad1a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/migrate/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ func Test_swapPVs(t *testing.T) {
for _, pvc := range pvcs.Items {
if pvc.Spec.VolumeName != "" {
logger.Printf("setting pv %s claim ref to pvc %s", pvc.Spec.VolumeName, pvc.Name)
mutatePV(ctx, logger, k, pvc.Spec.VolumeName,
err := mutatePV(ctx, logger, k, pvc.Spec.VolumeName,
func(volume *corev1.PersistentVolume) (*corev1.PersistentVolume, error) {
volume.Spec.ClaimRef = &corev1.ObjectReference{
APIVersion: "v1",
Expand All @@ -1259,6 +1259,9 @@ func Test_swapPVs(t *testing.T) {
return true
},
)
if err != nil {
logger.Printf("error mutating PV: %s", err)
}
}
}
case <-ctx.Done():
Expand Down

0 comments on commit 27cad1a

Please sign in to comment.