Skip to content

Commit

Permalink
Modified Test Case to include check for Memory and MemorySwap
Browse files Browse the repository at this point in the history
Signed-off-by: Rajdeep Dua <[email protected]>
  • Loading branch information
rajdeepd committed May 13, 2015
1 parent 340fd14 commit 1eea2c5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions integration-cli/docker_api_containers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,17 @@ func (s *DockerSuite) TestContainerApiPostCreateNull(c *check.C) {
if out != "" {
c.Fatalf("expected empty string, got %q", out)
}

outMemory, errMemory := inspectField(container.Id, "HostConfig.Memory")
c.Assert(outMemory, check.Equals, "0")
if errMemory != nil {
c.Fatal(errMemory, outMemory)
}
outMemorySwap, errMemorySwap := inspectField(container.Id, "HostConfig.MemorySwap")
c.Assert(outMemorySwap, check.Equals, "0")
if errMemorySwap != nil {
c.Fatal(errMemorySwap, outMemorySwap)
}
}

func (s *DockerSuite) TestCreateWithTooLowMemoryLimit(c *check.C) {
Expand Down

0 comments on commit 1eea2c5

Please sign in to comment.