1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

int-cli/TestRunInvalidCPUShares: fix for newer runc

A newer runc changed [1] a couple of certain error messages checked in this

test to be lowercased, which lead to a mismatch in this test case.

Fix is to remove "The" (which was replaced with "the").

[1] https://github.com/opencontainers/runc/pull/2441

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 56de0489fc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Kir Kolyshkin 2020-06-09 14:19:14 -07:00 committed by Sebastiaan van Stijn
parent 77e06fda0c
commit 5fce12cf25
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

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))
}