From 5fce12cf2559b1e0dacd9785190c73f0e689767b Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 9 Jun 2020 14:19:14 -0700 Subject: [PATCH] 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 (cherry picked from commit 56de0489fc7d5ec498ee5545d50b0e770a7ca339) Signed-off-by: Sebastiaan van Stijn --- integration-cli/docker_cli_run_unix_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-cli/docker_cli_run_unix_test.go b/integration-cli/docker_cli_run_unix_test.go index dc250a194d..e553b7806a 100644 --- a/integration-cli/docker_cli_run_unix_test.go +++ b/integration-cli/docker_cli_run_unix_test.go @@ -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)) }