mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #83398 from bclau/tests/fix-windows-image-pulling
tests: Simplifies image pulling tests
This commit is contained in:
commit
9039e6b754
@ -359,30 +359,10 @@ while true; do sleep 1; done
|
||||
imagePullTest(image, false, v1.PodPending, true, false)
|
||||
})
|
||||
|
||||
ginkgo.It("should not be able to pull non-existing image from gcr.io [NodeConformance]", func() {
|
||||
image := imageutils.GetE2EImage(imageutils.Invalid)
|
||||
imagePullTest(image, false, v1.PodPending, true, false)
|
||||
})
|
||||
|
||||
ginkgo.It("should be able to pull image from gcr.io [NodeConformance]", func() {
|
||||
image := imageutils.GetE2EImage(imageutils.DebianBase)
|
||||
isWindows := false
|
||||
if framework.NodeOSDistroIs("windows") {
|
||||
image = imageutils.GetE2EImage(imageutils.WindowsNanoServer)
|
||||
isWindows = true
|
||||
}
|
||||
imagePullTest(image, false, v1.PodRunning, false, isWindows)
|
||||
})
|
||||
|
||||
ginkgo.It("should be able to pull image from docker hub [NodeConformance]", func() {
|
||||
image := imageutils.GetE2EImage(imageutils.Alpine)
|
||||
isWindows := false
|
||||
if framework.NodeOSDistroIs("windows") {
|
||||
// TODO(claudiub): Switch to nanoserver image manifest list.
|
||||
image = "e2eteam/busybox:1.29"
|
||||
isWindows = true
|
||||
}
|
||||
imagePullTest(image, false, v1.PodRunning, false, isWindows)
|
||||
ginkgo.It("should be able to pull image [NodeConformance]", func() {
|
||||
// NOTE(claudiub): The agnhost image is supposed to work on both Linux and Windows.
|
||||
image := imageutils.GetE2EImage(imageutils.Agnhost)
|
||||
imagePullTest(image, false, v1.PodRunning, false, false)
|
||||
})
|
||||
|
||||
ginkgo.It("should not be able to pull from private registry without secret [NodeConformance]", func() {
|
||||
|
@ -118,8 +118,6 @@ var (
|
||||
const (
|
||||
// Agnhost image
|
||||
Agnhost = iota
|
||||
// Alpine image
|
||||
Alpine
|
||||
// APIServer image
|
||||
APIServer
|
||||
// AppArmorLoader image
|
||||
@ -138,8 +136,6 @@ const (
|
||||
CudaVectorAdd2
|
||||
// Dnsutils image
|
||||
Dnsutils
|
||||
// DebianBase image
|
||||
DebianBase
|
||||
// EchoServer image
|
||||
EchoServer
|
||||
// Etcd image
|
||||
@ -152,8 +148,6 @@ const (
|
||||
Httpd
|
||||
// HttpdNew image
|
||||
HttpdNew
|
||||
// Invalid image
|
||||
Invalid
|
||||
// InvalidRegistryImage image
|
||||
InvalidRegistryImage
|
||||
// IpcUtils image
|
||||
@ -209,14 +203,11 @@ const (
|
||||
VolumeGlusterServer
|
||||
// VolumeRBDServer image
|
||||
VolumeRBDServer
|
||||
// WindowsNanoServer image
|
||||
WindowsNanoServer
|
||||
)
|
||||
|
||||
func initImageConfigs() map[int]Config {
|
||||
configs := map[int]Config{}
|
||||
configs[Agnhost] = Config{e2eRegistry, "agnhost", "2.6"}
|
||||
configs[Alpine] = Config{dockerLibraryRegistry, "alpine", "3.7"}
|
||||
configs[AuthenticatedAlpine] = Config{gcAuthenticatedRegistry, "alpine", "3.7"}
|
||||
configs[AuthenticatedWindowsNanoServer] = Config{gcAuthenticatedRegistry, "windows-nanoserver", "v1"}
|
||||
configs[APIServer] = Config{e2eRegistry, "sample-apiserver", "1.10"}
|
||||
@ -226,14 +217,12 @@ func initImageConfigs() map[int]Config {
|
||||
configs[CudaVectorAdd] = Config{e2eRegistry, "cuda-vector-add", "1.0"}
|
||||
configs[CudaVectorAdd2] = Config{e2eRegistry, "cuda-vector-add", "2.0"}
|
||||
configs[Dnsutils] = Config{e2eRegistry, "dnsutils", "1.1"}
|
||||
configs[DebianBase] = Config{googleContainerRegistry, "debian-base", "0.4.1"}
|
||||
configs[EchoServer] = Config{e2eRegistry, "echoserver", "2.2"}
|
||||
configs[Etcd] = Config{gcRegistry, "etcd", "3.3.17"}
|
||||
configs[GBFrontend] = Config{sampleRegistry, "gb-frontend", "v6"}
|
||||
configs[GlusterDynamicProvisioner] = Config{dockerGluster, "glusterdynamic-provisioner", "v1.0"}
|
||||
configs[Httpd] = Config{dockerLibraryRegistry, "httpd", "2.4.38-alpine"}
|
||||
configs[HttpdNew] = Config{dockerLibraryRegistry, "httpd", "2.4.39-alpine"}
|
||||
configs[Invalid] = Config{gcRegistry, "invalid-image", "invalid-tag"}
|
||||
configs[InvalidRegistryImage] = Config{invalidRegistry, "alpine", "3.1"}
|
||||
configs[IpcUtils] = Config{e2eRegistry, "ipc-utils", "1.0"}
|
||||
configs[JessieDnsutils] = Config{e2eRegistry, "jessie-dnsutils", "1.0"}
|
||||
@ -262,7 +251,6 @@ func initImageConfigs() map[int]Config {
|
||||
configs[VolumeISCSIServer] = Config{e2eRegistry, "volume/iscsi", "2.0"}
|
||||
configs[VolumeGlusterServer] = Config{e2eRegistry, "volume/gluster", "1.0"}
|
||||
configs[VolumeRBDServer] = Config{e2eRegistry, "volume/rbd", "1.0.1"}
|
||||
configs[WindowsNanoServer] = Config{e2eRegistry, "windows-nanoserver", "v1"}
|
||||
return configs
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user