소스 검색

Merge pull request #18027 from tpounds/fix-err-message-typo

Fix error typo when --expose and --net are specified
Michael Crosby 9 년 전
부모
커밋
19debeb255
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      integration-cli/docker_cli_run_test.go
  2. 1 1
      runconfig/parse.go

+ 1 - 1
integration-cli/docker_cli_run_test.go

@@ -3419,7 +3419,7 @@ func (s *DockerSuite) TestRunContainerNetModeWithExposePort(c *check.C) {
 	}
 
 	out, _, err = dockerCmdWithError("run", "--expose", "5000", "--net=container:parent", "busybox")
-	if err == nil || !strings.Contains(out, "Conflicting options: --expose and the network mode (--expose)") {
+	if err == nil || !strings.Contains(out, "Conflicting options: --expose and the network mode (--net)") {
 		c.Fatalf("run --net=container with --expose should error out")
 	}
 }

+ 1 - 1
runconfig/parse.go

@@ -39,7 +39,7 @@ var (
 	// ErrConflictNetworkPublishPorts conflict between the pulbish options and the network mode
 	ErrConflictNetworkPublishPorts = fmt.Errorf("Conflicting options: -p, -P, --publish-all, --publish and the network mode (--net)")
 	// ErrConflictNetworkExposePorts conflict between the expose option and the network mode
-	ErrConflictNetworkExposePorts = fmt.Errorf("Conflicting options: --expose and the network mode (--expose)")
+	ErrConflictNetworkExposePorts = fmt.Errorf("Conflicting options: --expose and the network mode (--net)")
 )
 
 // Parse parses the specified args for the specified command and generates a Config,