From 626cbe9001ce61aeedca7cf82baa99ed047e3e08 Mon Sep 17 00:00:00 2001 From: Claudiu Belu Date: Tue, 20 Nov 2018 11:21:55 +0200 Subject: [PATCH] tests: Fixes wrong Pod Container Image usage in test/e2e/apps Some tests are not using the configured registry image names, causing some tests to fail on Windows, since those images are Linux only. --- test/e2e/apps/rc.go | 6 +++--- test/e2e/apps/replica_set.go | 4 ++-- test/e2e/apps/types.go | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test/e2e/apps/rc.go b/test/e2e/apps/rc.go index 8c127291f6..24b233c1ee 100644 --- a/test/e2e/apps/rc.go +++ b/test/e2e/apps/rc.go @@ -264,7 +264,7 @@ func testRCAdoptMatchingOrphans(f *framework.Framework) { Containers: []v1.Container{ { Name: name, - Image: NginxImageName, + Image: NginxImage, }, }, }, @@ -272,7 +272,7 @@ func testRCAdoptMatchingOrphans(f *framework.Framework) { By("When a replication controller with a matching selector is created") replicas := int32(1) - rcSt := newRC(name, replicas, map[string]string{"name": name}, name, NginxImageName) + rcSt := newRC(name, replicas, map[string]string{"name": name}, name, NginxImage) rcSt.Spec.Selector = map[string]string{"name": name} rc, err := f.ClientSet.CoreV1().ReplicationControllers(f.Namespace.Name).Create(rcSt) Expect(err).NotTo(HaveOccurred()) @@ -301,7 +301,7 @@ func testRCReleaseControlledNotMatching(f *framework.Framework) { name := "pod-release" By("Given a ReplicationController is created") replicas := int32(1) - rcSt := newRC(name, replicas, map[string]string{"name": name}, name, NginxImageName) + rcSt := newRC(name, replicas, map[string]string{"name": name}, name, NginxImage) rcSt.Spec.Selector = map[string]string{"name": name} rc, err := f.ClientSet.CoreV1().ReplicationControllers(f.Namespace.Name).Create(rcSt) Expect(err).NotTo(HaveOccurred()) diff --git a/test/e2e/apps/replica_set.go b/test/e2e/apps/replica_set.go index b41ea59513..170ea910fd 100644 --- a/test/e2e/apps/replica_set.go +++ b/test/e2e/apps/replica_set.go @@ -271,7 +271,7 @@ func testRSAdoptMatchingAndReleaseNotMatching(f *framework.Framework) { Containers: []v1.Container{ { Name: name, - Image: NginxImageName, + Image: NginxImage, }, }, }, @@ -279,7 +279,7 @@ func testRSAdoptMatchingAndReleaseNotMatching(f *framework.Framework) { By("When a replicaset with a matching selector is created") replicas := int32(1) - rsSt := newRS(name, replicas, map[string]string{"name": name}, name, NginxImageName) + rsSt := newRS(name, replicas, map[string]string{"name": name}, name, NginxImage) rsSt.Spec.Selector = &metav1.LabelSelector{MatchLabels: map[string]string{"name": name}} rs, err := f.ClientSet.AppsV1().ReplicaSets(f.Namespace.Name).Create(rsSt) Expect(err).NotTo(HaveOccurred()) diff --git a/test/e2e/apps/types.go b/test/e2e/apps/types.go index ed673b3eb8..0b9d9c70d1 100644 --- a/test/e2e/apps/types.go +++ b/test/e2e/apps/types.go @@ -21,6 +21,7 @@ import ( imageutils "k8s.io/kubernetes/test/utils/image" ) +// NOTE(claudiub): These constants should NOT be used as Pod Container Images. const ( NginxImageName = "nginx" RedisImageName = "redis"