mirror of https://github.com/k3s-io/k3s
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.pull/564/head
parent
50e02fd0cc
commit
626cbe9001
|
@ -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) {
|
||||||
|
|
||||||
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) {
|
||||||
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) {
|
||||||
Containers: []v1.Container{
|
Containers: []v1.Container{
|
||||||
{
|
{
|
||||||
Name: name,
|
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")
|
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 (
|
||||||
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"
|
||||||
|
|
Loading…
Reference in New Issue