Commit 626cbe90 authored by Claudiu Belu's avatar Claudiu Belu

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.
parent 50e02fd0
...@@ -264,7 +264,7 @@ func testRCAdoptMatchingOrphans(f *framework.Framework) { ...@@ -264,7 +264,7 @@ func testRCAdoptMatchingOrphans(f *framework.Framework) {
Containers: []v1.Container{ Containers: []v1.Container{
{ {
Name: name, Name: name,
Image: NginxImageName, Image: NginxImage,
}, },
}, },
}, },
...@@ -272,7 +272,7 @@ func testRCAdoptMatchingOrphans(f *framework.Framework) { ...@@ -272,7 +272,7 @@ func testRCAdoptMatchingOrphans(f *framework.Framework) {
By("When a replication controller with a matching selector is created") By("When a replication controller with a matching selector is created")
replicas := int32(1) 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} rcSt.Spec.Selector = map[string]string{"name": name}
rc, err := f.ClientSet.CoreV1().ReplicationControllers(f.Namespace.Name).Create(rcSt) rc, err := f.ClientSet.CoreV1().ReplicationControllers(f.Namespace.Name).Create(rcSt)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
...@@ -301,7 +301,7 @@ func testRCReleaseControlledNotMatching(f *framework.Framework) { ...@@ -301,7 +301,7 @@ func testRCReleaseControlledNotMatching(f *framework.Framework) {
name := "pod-release" name := "pod-release"
By("Given a ReplicationController is created") By("Given a ReplicationController is created")
replicas := int32(1) 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} rcSt.Spec.Selector = map[string]string{"name": name}
rc, err := f.ClientSet.CoreV1().ReplicationControllers(f.Namespace.Name).Create(rcSt) rc, err := f.ClientSet.CoreV1().ReplicationControllers(f.Namespace.Name).Create(rcSt)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
......
...@@ -271,7 +271,7 @@ func testRSAdoptMatchingAndReleaseNotMatching(f *framework.Framework) { ...@@ -271,7 +271,7 @@ func testRSAdoptMatchingAndReleaseNotMatching(f *framework.Framework) {
Containers: []v1.Container{ Containers: []v1.Container{
{ {
Name: name, Name: name,
Image: NginxImageName, Image: NginxImage,
}, },
}, },
}, },
...@@ -279,7 +279,7 @@ func testRSAdoptMatchingAndReleaseNotMatching(f *framework.Framework) { ...@@ -279,7 +279,7 @@ func testRSAdoptMatchingAndReleaseNotMatching(f *framework.Framework) {
By("When a replicaset with a matching selector is created") By("When a replicaset with a matching selector is created")
replicas := int32(1) 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}} rsSt.Spec.Selector = &metav1.LabelSelector{MatchLabels: map[string]string{"name": name}}
rs, err := f.ClientSet.AppsV1().ReplicaSets(f.Namespace.Name).Create(rsSt) rs, err := f.ClientSet.AppsV1().ReplicaSets(f.Namespace.Name).Create(rsSt)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
......
...@@ -21,6 +21,7 @@ import ( ...@@ -21,6 +21,7 @@ import (
imageutils "k8s.io/kubernetes/test/utils/image" imageutils "k8s.io/kubernetes/test/utils/image"
) )
// NOTE(claudiub): These constants should NOT be used as Pod Container Images.
const ( const (
NginxImageName = "nginx" NginxImageName = "nginx"
RedisImageName = "redis" RedisImageName = "redis"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment