From 609b5c30105f95c5c9d2dd0f54490e46a770a4d4 Mon Sep 17 00:00:00 2001 From: Claudiu Belu Date: Fri, 23 Nov 2018 18:07:27 +0200 Subject: [PATCH] tests: Adds docker hub Windows image test case Adds the test "should be able to pull image from docker hub [WindowsOnly]", which will pull a Windows busybox image from dockerhub. Since it is busybox, the same command will also work for this image. The busybox image is currently used in other E2E tests, so the image should already be prepulled on the nodes. Additionally, the image has a manifest list for Windows Server 1803 and Windows Server 2019, and future versions will be added to it. --- test/e2e/common/runtime.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/e2e/common/runtime.go b/test/e2e/common/runtime.go index 333bf1922e8..5c62ef271d5 100644 --- a/test/e2e/common/runtime.go +++ b/test/e2e/common/runtime.go @@ -19,6 +19,7 @@ package common import ( "fmt" "path" + "strings" "time" "k8s.io/api/core/v1" @@ -272,18 +273,24 @@ while true; do sleep 1; done waiting: true, }, { + // TODO(claudiub): Add a Windows equivalent test. description: "should be able to pull image from gcr.io [LinuxOnly]", image: "gcr.io/google-containers/debian-base:0.4.1", phase: v1.PodRunning, waiting: false, }, { - // TODO(claudiub): Remove the [LinuxOnly] tag when a Windows-friendly image is used instead of alpine. description: "should be able to pull image from docker hub [LinuxOnly]", image: "alpine:3.7", phase: v1.PodRunning, waiting: false, }, + { + description: "should be able to pull image from docker hub [WindowsOnly]", + image: "e2eteam/busybox:1.29", + phase: v1.PodRunning, + waiting: false, + }, { description: "should not be able to pull from private registry without secret", image: "gcr.io/authenticated-image-pulling/alpine:3.7", @@ -300,6 +307,9 @@ while true; do sleep 1; done } { testCase := testCase It(testCase.description+" [NodeConformance]", func() { + if strings.Contains(testCase.description, "[WindowsOnly]") { + framework.SkipUnlessNodeOSDistroIs("windows") + } name := "image-pull-test" command := []string{"/bin/sh", "-c", "while true; do sleep 1; done"} container := ConformanceContainer{