Skip to content

Commit

Permalink
Merge pull request moby#20943 from vdemeester/20942-fix-containerPsCo…
Browse files Browse the repository at this point in the history
…ntext

Fix moby#20942 TestContainerPsContext unit test
  • Loading branch information
runcom committed Mar 4, 2016
2 parents 29bade2 + 2787072 commit 44b5634
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/client/formatter/custom_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

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

var ctx containerContext
cases := []struct {
Expand Down Expand Up @@ -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{}, true, "", 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 {
Expand Down

0 comments on commit 44b5634

Please sign in to comment.