mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
integration-cli: TestRunInvalidCpuset.. create instead of run
These tests don't have to run a container, as validation happens on create. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -704,7 +704,7 @@ func (s *DockerCLIRunSuite) TestRunInvalidCpusetCpusFlagValue(c *testing.T) {
|
||||
break
|
||||
}
|
||||
}
|
||||
out, _, err := dockerCmdWithError("run", "--cpuset-cpus", strconv.Itoa(invalid), "busybox", "true")
|
||||
out, _, err := dockerCmdWithError("create", "--cpuset-cpus", strconv.Itoa(invalid), "busybox", "true")
|
||||
assert.ErrorContains(c, err, "")
|
||||
expected := fmt.Sprintf("Error response from daemon: Requested CPUs are not available - requested %s, available: %s", strconv.Itoa(invalid), sysInfo.Cpus)
|
||||
assert.Assert(c, is.Contains(out, expected))
|
||||
@@ -723,7 +723,7 @@ func (s *DockerCLIRunSuite) TestRunInvalidCpusetMemsFlagValue(c *testing.T) {
|
||||
break
|
||||
}
|
||||
}
|
||||
out, _, err := dockerCmdWithError("run", "--cpuset-mems", strconv.Itoa(invalid), "busybox", "true")
|
||||
out, _, err := dockerCmdWithError("create", "--cpuset-mems", strconv.Itoa(invalid), "busybox", "true")
|
||||
assert.ErrorContains(c, err, "")
|
||||
expected := fmt.Sprintf("Error response from daemon: Requested memory nodes are not available - requested %s, available: %s", strconv.Itoa(invalid), sysInfo.Mems)
|
||||
assert.Assert(c, is.Contains(out, expected))
|
||||
|
||||
Reference in New Issue
Block a user