Skip to content

Commit 7f95a21

Browse files
committed
Resolve test issues
1 parent 463a5a4 commit 7f95a21

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cmd/nerdctl/container/container_logs_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,16 @@ bar
7373
{
7474
Description: "since 60s",
7575
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
76-
return helpers.Command("logs", "--since", "60s", data.Labels().Get("cID"))
76+
since := time.Now().Add(-60 * time.Second).UTC().Format(time.RFC3339Nano)
77+
return helpers.Command("logs", "--since", since, data.Labels().Get("cID"))
7778
},
7879
Expected: test.Expects(0, nil, expect.Equals(expected)),
7980
},
8081
{
8182
Description: "until 60s",
8283
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
83-
return helpers.Command("logs", "--until", "60s", data.Labels().Get("cID"))
84+
until := time.Now().Add(-60 * time.Second).UTC().Format(time.RFC3339Nano)
85+
return helpers.Command("logs", "--until", until, data.Labels().Get("cID"))
8486
},
8587
Expected: test.Expects(0, nil, expect.DoesNotContain(expected)),
8688
},

0 commit comments

Comments
 (0)