Browse code

Windows: Fix TestRunLookupGoogleDNS for nanoserver

Signed-off-by: John Howard <jhoward@microsoft.com>

John Howard authored on 2016/07/22 11:46:17
Showing 1 changed files
... ...
@@ -63,12 +63,14 @@ func (s *DockerSuite) TestRunLeakyFileDescriptors(c *check.C) {
63 63
 // this will fail when Internet access is unavailable
64 64
 func (s *DockerSuite) TestRunLookupGoogleDNS(c *check.C) {
65 65
 	testRequires(c, Network, NotArm)
66
-	image := DefaultImage
67 66
 	if daemonPlatform == "windows" {
68
-		// nslookup isn't present in Windows busybox. Is built-in.
69
-		image = WindowsBaseImage
67
+		// nslookup isn't present in Windows busybox. Is built-in. Further,
68
+		// nslookup isn't present in nanoserver. Hence just use PowerShell...
69
+		dockerCmd(c, "run", WindowsBaseImage, "powershell", "Resolve-DNSName", "google.com")
70
+	} else {
71
+		dockerCmd(c, "run", DefaultImage, "nslookup", "google.com")
70 72
 	}
71
-	dockerCmd(c, "run", image, "nslookup", "google.com")
73
+
72 74
 }
73 75
 
74 76
 // the exit code should be 0