Skip to content

Commit 0f82280

Browse files
committed
fix unit-test
1 parent 257028d commit 0f82280

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/controller/psrestore/controller_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,9 @@ func TestRestoreStatusErrStateDesc(t *testing.T) {
386386
if tt.cluster.Spec.Backup == nil {
387387
tt.cluster.Spec.Backup = &apiv1alpha1.BackupSpec{}
388388
}
389+
if tt.cluster.Spec.Backup.InitContainer == nil {
390+
tt.cluster.Spec.Backup.InitContainer = &apiv1alpha1.InitContainerSpec{}
391+
}
389392
tt.cluster.Spec.Backup.InitContainer.Image = "operator-image"
390393
tt.objects = append(tt.objects, tt.cluster)
391394
tt.objects = append(tt.objects,

0 commit comments

Comments
 (0)