Fix #20942 TestContainerPsContext unit test
| ... | ... |
@@ -12,7 +12,7 @@ import ( |
| 12 | 12 |
|
| 13 | 13 |
func TestContainerPsContext(t *testing.T) {
|
| 14 | 14 |
containerID := stringid.GenerateRandomID() |
| 15 |
- unix := time.Now().Unix() |
|
| 15 |
+ unix := time.Now().Add(-65 * time.Second).Unix() |
|
| 16 | 16 |
|
| 17 | 17 |
var ctx containerContext |
| 18 | 18 |
cases := []struct {
|
| ... | ... |
@@ -55,7 +55,7 @@ func TestContainerPsContext(t *testing.T) {
|
| 55 | 55 |
{types.Container{SizeRw: 10, SizeRootFs: 20}, true, "10 B (virtual 20 B)", sizeHeader, ctx.Size},
|
| 56 | 56 |
{types.Container{}, true, "", labelsHeader, ctx.Labels},
|
| 57 | 57 |
{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},
|
|
| 59 | 59 |
} |
| 60 | 60 |
|
| 61 | 61 |
for _, c := range cases {
|