mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-04 07:48:44 +00:00
Port test from integration tests
Addresses #12255 Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
This commit is contained in:
@@ -3496,15 +3496,3 @@ func TestRunPidHostWithChildIsKillable(t *testing.T) {
|
||||
}
|
||||
logDone("run - can kill container with pid-host and some childs of pid 1")
|
||||
}
|
||||
|
||||
func TestRunWithTooSmallMemoryLimit(t *testing.T) {
|
||||
defer deleteAllContainers()
|
||||
// this memory limit is 1 byte less than the min, which is 4MB
|
||||
// https://github.com/docker/docker/blob/v1.5.0/daemon/create.go#L22
|
||||
out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "run", "-m", "4194303", "busybox"))
|
||||
if err == nil || !strings.Contains(out, "Minimum memory limit allowed is 4MB") {
|
||||
t.Fatalf("expected run to fail when using too low a memory limit: %q", out)
|
||||
}
|
||||
|
||||
logDone("run - can't set too low memory limit")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user