Skip to content

Commit e434b57

Browse files
committed
failureReason - velero oom test
1 parent 70699ec commit e434b57

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

pkg/analyze/velero_test.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,33 @@ func TestAnalyzeVelero_Restores(t *testing.T) {
626626
},
627627
},
628628
},
629+
{
630+
name: "restore failureReason - velero pod restarted",
631+
args: args{
632+
restores: []*velerov1.Restore{
633+
{
634+
ObjectMeta: metav1.ObjectMeta{
635+
Name: "instance-abcdef.kotsadm",
636+
},
637+
Spec: velerov1.RestoreSpec{
638+
BackupName: "instance-abcdef",
639+
},
640+
Status: velerov1.RestoreStatus{
641+
Phase: velerov1.RestorePhaseCompleted,
642+
FailureReason: "found a restore with status \"InProgress\" during the server starting, mark it as \"Failed\"",
643+
},
644+
},
645+
},
646+
},
647+
want: []*AnalyzeResult{
648+
{
649+
Title: "Restore instance-abcdef.kotsadm",
650+
Message: "Restore instance-abcdef.kotsadm reported a FailureReason: found a restore with status \"InProgress\" during the server starting, mark it as \"Failed\". Resolution: The Velero pod exited or restarted while a restore was already in progress, most likely due to running out of memory. Check the resource allocation of the velero pod and increase it or remove the memory limit.",
651+
IsPass: false,
652+
IsFail: true,
653+
},
654+
},
655+
},
629656
}
630657
for _, tt := range tests {
631658
t.Run(tt.name, func(t *testing.T) {

0 commit comments

Comments
 (0)