فهرست منبع

Merge pull request #11310 from ahmetalpbalkan/win-cli/ping-icmp

integ-cli: remove ICMP dependency from test, use nslookup
Tibor Vass 10 سال پیش
والد
کامیت
d6a6c7d4d9
1فایلهای تغییر یافته به همراه4 افزوده شده و 5 حذف شده
  1. 4 5
      integration-cli/docker_cli_run_test.go

+ 4 - 5
integration-cli/docker_cli_run_test.go

@@ -144,18 +144,17 @@ func TestRunLeakyFileDescriptors(t *testing.T) {
 	logDone("run - check file descriptor leakage")
 }
 
-// it should be possible to ping Google DNS resolver
+// it should be possible to lookup Google DNS
 // this will fail when Internet access is unavailable
-func TestRunPingGoogle(t *testing.T) {
+func TestRunLookupGoogleDns(t *testing.T) {
 	defer deleteAllContainers()
 
-	runCmd := exec.Command(dockerBinary, "run", "busybox", "ping", "-c", "1", "8.8.8.8")
-	out, _, _, err := runCommandWithStdoutStderr(runCmd)
+	out, _, _, err := runCommandWithStdoutStderr(exec.Command(dockerBinary, "run", "busybox", "nslookup", "google.com"))
 	if err != nil {
 		t.Fatalf("failed to run container: %v, output: %q", err, out)
 	}
 
-	logDone("run - ping 8.8.8.8")
+	logDone("run - nslookup google.com")
 }
 
 // the exit code should be 0