Prechádzať zdrojové kódy

Merge pull request #34842 from dnephin/fix-integration-on-timeout

[integration-cli] Only attempt to find pid with local daemon
Yong Tang 7 rokov pred
rodič
commit
c5c0702a4d
1 zmenil súbory, kde vykonal 4 pridanie a 1 odobranie
  1. 4 1
      integration-cli/check_test.go

+ 4 - 1
integration-cli/check_test.go

@@ -79,6 +79,9 @@ type DockerSuite struct {
 }
 }
 
 
 func (s *DockerSuite) OnTimeout(c *check.C) {
 func (s *DockerSuite) OnTimeout(c *check.C) {
+	if !testEnv.IsLocalDaemon() {
+		return
+	}
 	path := filepath.Join(os.Getenv("DEST"), "docker.pid")
 	path := filepath.Join(os.Getenv("DEST"), "docker.pid")
 	b, err := ioutil.ReadFile(path)
 	b, err := ioutil.ReadFile(path)
 	if err != nil {
 	if err != nil {
@@ -91,7 +94,7 @@ func (s *DockerSuite) OnTimeout(c *check.C) {
 	}
 	}
 
 
 	daemonPid := int(rawPid)
 	daemonPid := int(rawPid)
-	if daemonPid > 0 && testEnv.IsLocalDaemon() {
+	if daemonPid > 0 {
 		daemon.SignalDaemonDump(daemonPid)
 		daemon.SignalDaemonDump(daemonPid)
 	}
 	}
 }
 }