Merge pull request #41085 from kolyshkin/invalid-cpu-shares-fix

int-cli/TestRunInvalidCPUShares: fix for newer runc
This commit is contained in:
Sebastiaan van Stijn 2020-06-10 13:45:45 +02:00 committed by GitHub
commit a4abdce703
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -765,7 +765,7 @@ func (s *DockerSuite) TestRunInvalidCPUShares(c *testing.T) {
testRequires(c, cpuShare, DaemonIsLinux)
out, _, err := dockerCmdWithError("run", "--cpu-shares", "1", "busybox", "echo", "test")
assert.ErrorContains(c, err, "", out)
expected := "The minimum allowed cpu-shares is 2"
expected := "minimum allowed cpu-shares is 2"
assert.Assert(c, strings.Contains(out, expected))
out, _, err = dockerCmdWithError("run", "--cpu-shares", "-1", "busybox", "echo", "test")
@ -775,7 +775,7 @@ func (s *DockerSuite) TestRunInvalidCPUShares(c *testing.T) {
out, _, err = dockerCmdWithError("run", "--cpu-shares", "99999999", "busybox", "echo", "test")
assert.ErrorContains(c, err, "", out)
expected = "The maximum allowed cpu-shares is"
expected = "maximum allowed cpu-shares is"
assert.Assert(c, strings.Contains(out, expected))
}