mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #72777 from bclau/tests/hardcoded-docker-image
Adds test which pulls dockerhub Windows image
This commit is contained in:
commit
d5b890ea46
@ -19,6 +19,7 @@ package common
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"path"
|
"path"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
"k8s.io/api/core/v1"
|
||||||
@ -272,18 +273,24 @@ while true; do sleep 1; done
|
|||||||
waiting: true,
|
waiting: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
// TODO(claudiub): Add a Windows equivalent test.
|
||||||
description: "should be able to pull image from gcr.io [LinuxOnly]",
|
description: "should be able to pull image from gcr.io [LinuxOnly]",
|
||||||
image: "gcr.io/google-containers/debian-base:0.4.1",
|
image: "gcr.io/google-containers/debian-base:0.4.1",
|
||||||
phase: v1.PodRunning,
|
phase: v1.PodRunning,
|
||||||
waiting: false,
|
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]",
|
description: "should be able to pull image from docker hub [LinuxOnly]",
|
||||||
image: "alpine:3.7",
|
image: "alpine:3.7",
|
||||||
phase: v1.PodRunning,
|
phase: v1.PodRunning,
|
||||||
waiting: false,
|
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",
|
description: "should not be able to pull from private registry without secret",
|
||||||
image: "gcr.io/authenticated-image-pulling/alpine:3.7",
|
image: "gcr.io/authenticated-image-pulling/alpine:3.7",
|
||||||
@ -300,6 +307,9 @@ while true; do sleep 1; done
|
|||||||
} {
|
} {
|
||||||
testCase := testCase
|
testCase := testCase
|
||||||
It(testCase.description+" [NodeConformance]", func() {
|
It(testCase.description+" [NodeConformance]", func() {
|
||||||
|
if strings.Contains(testCase.description, "[WindowsOnly]") {
|
||||||
|
framework.SkipUnlessNodeOSDistroIs("windows")
|
||||||
|
}
|
||||||
name := "image-pull-test"
|
name := "image-pull-test"
|
||||||
command := []string{"/bin/sh", "-c", "while true; do sleep 1; done"}
|
command := []string{"/bin/sh", "-c", "while true; do sleep 1; done"}
|
||||||
container := ConformanceContainer{
|
container := ConformanceContainer{
|
||||||
|
Loading…
Reference in New Issue
Block a user