Browse code

Disable TestRunServicingContainer on RS4+ builds

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

John Howard authored on 2017/11/28 07:37:18
Showing 1 changed files
... ...
@@ -4284,6 +4284,17 @@ func (s *DockerSuite) TestRunCredentialSpecWellFormed(c *check.C) {
4284 4284
 func (s *DockerSuite) TestRunServicingContainer(c *check.C) {
4285 4285
 	testRequires(c, DaemonIsWindows, SameHostDaemon)
4286 4286
 
4287
+	// This functionality does not exist in post-RS3 builds.
4288
+	// Note we get the version number from the full build string, as Windows
4289
+	// reports Windows 8 version 6.2 build 9200 from non-manifested binaries.
4290
+	// Ref: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx
4291
+	v, err := kernel.GetKernelVersion()
4292
+	c.Assert(err, checker.IsNil)
4293
+	build, _ := strconv.Atoi(strings.Split(strings.SplitN(v.String(), " ", 3)[2][1:], ".")[0])
4294
+	if build > 16299 {
4295
+		c.Skip("Disabled on post-RS3 builds")
4296
+	}
4297
+
4287 4298
 	out := cli.DockerCmd(c, "run", "-d", testEnv.MinimalBaseImage(), "cmd", "/c", "mkdir c:\\programdata\\Microsoft\\Windows\\ContainerUpdates\\000_000_d99f45d0-ffc8-4af7-bd9c-ea6a62e035c9_200 && sc control cexecsvc 255").Combined()
4288 4299
 	containerID := strings.TrimSpace(out)
4289 4300
 	cli.WaitExited(c, containerID, 60*time.Second)