From 3241b564a5c2799cac9836101b9e208b216a9ff5 Mon Sep 17 00:00:00 2001 From: Phil Estes Date: Wed, 2 Dec 2015 09:35:54 -0500 Subject: [PATCH] Differentiate integration test error messages Makes it easier to debug in the future given three different docker run executions were all outputting the same error string. Docker-DCO-1.1-Signed-off-by: Phil Estes (github: estesp) --- integration-cli/docker_cli_run_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index b839ee78cf..880c2f9eea 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -2858,18 +2858,18 @@ func (s *DockerSuite) TestRunUnshareProc(c *check.C) { name := "acidburn" if out, _, err := dockerCmdWithError("run", "--name", name, "jess/unshare", "unshare", "-p", "-m", "-f", "-r", "--mount-proc=/proc", "mount"); err == nil || !strings.Contains(out, "Permission denied") { - c.Fatalf("unshare should have failed with permission denied, got: %s, %v", out, err) + c.Fatalf("unshare with --mount-proc should have failed with permission denied, got: %s, %v", out, err) } name = "cereal" if out, _, err := dockerCmdWithError("run", "--name", name, "jess/unshare", "unshare", "-p", "-m", "-f", "-r", "mount", "-t", "proc", "none", "/proc"); err == nil || !strings.Contains(out, "Permission denied") { - c.Fatalf("unshare should have failed with permission denied, got: %s, %v", out, err) + c.Fatalf("unshare and mount of /proc should have failed with permission denied, got: %s, %v", out, err) } /* Ensure still fails if running privileged with the default policy */ name = "crashoverride" if out, _, err := dockerCmdWithError("run", "--privileged", "--security-opt", "apparmor:docker-default", "--name", name, "jess/unshare", "unshare", "-p", "-m", "-f", "-r", "mount", "-t", "proc", "none", "/proc"); err == nil || !(strings.Contains(strings.ToLower(out), "permission denied") || strings.Contains(strings.ToLower(out), "operation not permitted")) { - c.Fatalf("unshare should have failed with permission denied, got: %s, %v", out, err) + c.Fatalf("privileged unshare with apparmor should have failed with permission denied, got: %s, %v", out, err) } }