Skip to content

Commit 44b5634

Browse files
committed
Merge pull request moby#20943 from vdemeester/20942-fix-containerPsContext
Fix moby#20942 TestContainerPsContext unit test
2 parents 29bade2 + 2787072 commit 44b5634

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/client/formatter/custom_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
func TestContainerPsContext(t *testing.T) {
1414
containerID := stringid.GenerateRandomID()
15-
unix := time.Now().Unix()
15+
unix := time.Now().Add(-65 * time.Second).Unix()
1616

1717
var ctx containerContext
1818
cases := []struct {
@@ -55,7 +55,7 @@ func TestContainerPsContext(t *testing.T) {
5555
{types.Container{SizeRw: 10, SizeRootFs: 20}, true, "10 B (virtual 20 B)", sizeHeader, ctx.Size},
5656
{types.Container{}, true, "", labelsHeader, ctx.Labels},
5757
{types.Container{Labels: map[string]string{"cpu": "6", "storage": "ssd"}}, true, "cpu=6,storage=ssd", labelsHeader, ctx.Labels},
58-
{types.Container{Created: unix}, true, "Less than a second", runningForHeader, ctx.RunningFor},
58+
{types.Container{Created: unix}, true, "About a minute", runningForHeader, ctx.RunningFor},
5959
}
6060

6161
for _, c := range cases {

0 commit comments

Comments
 (0)