Skip to content

Commit aef4276

Browse files
Add another date format to unit test§
1 parent b846b0b commit aef4276

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

internal/pkg/services/mongodbflex/utils/utils_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,24 @@ func TestGetRestoreStatus(t *testing.T) {
589589
},
590590
expectedOutput: "in progress",
591591
},
592+
{
593+
description: "get latest restore, another date format",
594+
listRestoreJobsResp: &mongodbflex.ListRestoreJobsResponse{
595+
Items: &[]mongodbflex.RestoreInstanceStatus{
596+
{
597+
BackupID: utils.Ptr(testBackupId),
598+
Date: utils.Ptr("2009-11-10 23:00:00 +0000 UTC m=+0.000000001"),
599+
Status: utils.Ptr("finished"),
600+
},
601+
{
602+
BackupID: utils.Ptr(testBackupId),
603+
Date: utils.Ptr("2009-11-11 23:00:00 +0000 UTC m=+0.000000001"),
604+
Status: utils.Ptr("in progress"),
605+
},
606+
},
607+
},
608+
expectedOutput: "in progress",
609+
},
592610
{
593611
description: "no restore job for that backup",
594612
listRestoreJobsResp: &mongodbflex.ListRestoreJobsResponse{

0 commit comments

Comments
 (0)