Explorar o código

integration-cli: fix TestImportBadURL w/o network

As explained in the test comment itself, the error message may vary on
different platform.
This patch adds another condition found while testing w/o network
access on RHEL based distros (Fedora, RHEL, CentOS).

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Antonio Murdaca %!s(int64=8) %!d(string=hai) anos
pai
achega
e2be3fee02
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      integration-cli/docker_cli_import_test.go

+ 1 - 0
integration-cli/docker_cli_import_test.go

@@ -37,6 +37,7 @@ func (s *DockerSuite) TestImportBadURL(c *check.C) {
 	c.Assert(err, checker.NotNil, check.Commentf("import was supposed to fail but didn't"))
 	c.Assert(err, checker.NotNil, check.Commentf("import was supposed to fail but didn't"))
 	// Depending on your system you can get either of these errors
 	// Depending on your system you can get either of these errors
 	if !strings.Contains(out, "dial tcp") &&
 	if !strings.Contains(out, "dial tcp") &&
+		!strings.Contains(out, "ApplyLayer exit status 1 stdout:  stderr: archive/tar: invalid tar header") &&
 		!strings.Contains(out, "Error processing tar file") {
 		!strings.Contains(out, "Error processing tar file") {
 		c.Fatalf("expected an error msg but didn't get one.\nErr: %v\nOut: %v", err, out)
 		c.Fatalf("expected an error msg but didn't get one.\nErr: %v\nOut: %v", err, out)
 	}
 	}