mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Try to fix #20942 TestContainerPsContext unit test
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
15e68dc8ee
commit
2787072a65
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ import (
|
||||||
|
|
||||||
func TestContainerPsContext(t *testing.T) {
|
func TestContainerPsContext(t *testing.T) {
|
||||||
containerID := stringid.GenerateRandomID()
|
containerID := stringid.GenerateRandomID()
|
||||||
unix := time.Now().Unix()
|
unix := time.Now().Add(-65 * time.Second).Unix()
|
||||||
|
|
||||||
var ctx containerContext
|
var ctx containerContext
|
||||||
cases := []struct {
|
cases := []struct {
|
||||||
|
@ -55,7 +55,7 @@ func TestContainerPsContext(t *testing.T) {
|
||||||
{types.Container{SizeRw: 10, SizeRootFs: 20}, true, "10 B (virtual 20 B)", sizeHeader, ctx.Size},
|
{types.Container{SizeRw: 10, SizeRootFs: 20}, true, "10 B (virtual 20 B)", sizeHeader, ctx.Size},
|
||||||
{types.Container{}, true, "", labelsHeader, ctx.Labels},
|
{types.Container{}, true, "", labelsHeader, ctx.Labels},
|
||||||
{types.Container{Labels: map[string]string{"cpu": "6", "storage": "ssd"}}, true, "cpu=6,storage=ssd", labelsHeader, ctx.Labels},
|
{types.Container{Labels: map[string]string{"cpu": "6", "storage": "ssd"}}, true, "cpu=6,storage=ssd", labelsHeader, ctx.Labels},
|
||||||
{types.Container{Created: unix}, true, "Less than a second", runningForHeader, ctx.RunningFor},
|
{types.Container{Created: unix}, true, "About a minute", runningForHeader, ctx.RunningFor},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, c := range cases {
|
for _, c := range cases {
|
||||||
|
|
Loading…
Add table
Reference in a new issue