Commit 3b63b06b authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #24849 from fejta/flake

Automatic merge from submit-queue Use tagged redis image for kubectl test, move json test file out of deprecated examples Closes #24642 Changes the redis image to use the :e2e tagged version on gcr.io. Since the examples/ subdir is deprecated in favor of the new kubernetes/kubernetes.github.io I just copied this file to test-manifests/kubectl like some other files.
parents 963aebd3 08c5af6e
......@@ -76,6 +76,7 @@ const (
runJobTimeout = 5 * time.Minute
busyboxImage = "gcr.io/google_containers/busybox:1.24"
nginxImage = "gcr.io/google_containers/nginx:1.7.9"
kubeCtlManifestPath = "test/e2e/testing-manifests/kubectl"
)
var (
......@@ -560,7 +561,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
framework.KubeDescribe("Kubectl apply", func() {
It("should apply a new configuration to an existing RC", func() {
mkpath := func(file string) string {
return filepath.Join(framework.TestContext.RepoRoot, "examples/guestbook-go", file)
return filepath.Join(framework.TestContext.RepoRoot, kubeCtlManifestPath, file)
}
controllerJson := mkpath("redis-master-controller.json")
nsFlag := fmt.Sprintf("--namespace=%v", ns)
......@@ -576,7 +577,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
})
It("should reuse nodePort when apply to an existing SVC", func() {
mkpath := func(file string) string {
return filepath.Join(framework.TestContext.RepoRoot, "examples/guestbook-go", file)
return filepath.Join(framework.TestContext.RepoRoot, kubeCtlManifestPath, file)
}
serviceJson := mkpath("redis-master-service.json")
nsFlag := fmt.Sprintf("--namespace=%v", ns)
......@@ -617,7 +618,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
framework.SkipUnlessServerVersionGTE(nodePortsOptionalVersion, c)
mkpath := func(file string) string {
return filepath.Join(framework.TestContext.RepoRoot, "examples/guestbook-go", file)
return filepath.Join(framework.TestContext.RepoRoot, kubeCtlManifestPath, file)
}
controllerJson := mkpath("redis-master-controller.json")
serviceJson := mkpath("redis-master-service.json")
......@@ -639,7 +640,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
{"Status:", "Running"},
{"IP:"},
{"Controllers:", "ReplicationController/redis-master"},
{"Image:", "redis"},
{"Image:", redisImage},
{"cpu:", "BestEffort"},
{"State:", "Running"},
}
......@@ -651,7 +652,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
requiredStrings := [][]string{
{"Name:", "redis-master"},
{"Namespace:", ns},
{"Image(s):", "redis"},
{"Image(s):", redisImage},
{"Selector:", "app=redis,role=master"},
{"Labels:", "app=redis,role=master"},
{"Replicas:", "1 current", "1 desired"},
......@@ -716,7 +717,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
framework.KubeDescribe("Kubectl expose", func() {
It("should create services for rc [Conformance]", func() {
mkpath := func(file string) string {
return filepath.Join(framework.TestContext.RepoRoot, "examples/guestbook-go", file)
return filepath.Join(framework.TestContext.RepoRoot, kubeCtlManifestPath, file)
}
controllerJson := mkpath("redis-master-controller.json")
nsFlag := fmt.Sprintf("--namespace=%v", ns)
......@@ -832,7 +833,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
containerName := "redis-master"
BeforeEach(func() {
mkpath := func(file string) string {
return filepath.Join(framework.TestContext.RepoRoot, "examples/guestbook-go", file)
return filepath.Join(framework.TestContext.RepoRoot, kubeCtlManifestPath, file)
}
rcPath = mkpath("redis-master-controller.json")
By("creating an rc")
......@@ -890,7 +891,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
framework.KubeDescribe("Kubectl patch", func() {
It("should add annotations for pods in rc [Conformance]", func() {
mkpath := func(file string) string {
return filepath.Join(framework.TestContext.RepoRoot, "examples/guestbook-go", file)
return filepath.Join(framework.TestContext.RepoRoot, kubeCtlManifestPath, file)
}
controllerJson := mkpath("redis-master-controller.json")
nsFlag := fmt.Sprintf("--namespace=%v", ns)
......
{
"kind":"ReplicationController",
"apiVersion":"v1",
"metadata":{
"name":"redis-master",
"labels":{
"app":"redis",
"role":"master"
}
},
"spec":{
"replicas":1,
"selector":{
"app":"redis",
"role":"master"
},
"template":{
"metadata":{
"labels":{
"app":"redis",
"role":"master"
}
},
"spec":{
"containers":[
{
"name":"redis-master",
"image": "gcr.io/google_containers/redis:e2e",
"ports":[
{
"name":"redis-server",
"containerPort":6379
}
]
}
]
}
}
}
}
{
"kind":"Service",
"apiVersion":"v1",
"metadata":{
"name":"redis-master",
"labels":{
"app":"redis",
"role":"master"
}
},
"spec":{
"ports": [
{
"port":6379,
"targetPort":"redis-server"
}
],
"selector":{
"app":"redis",
"role":"master"
}
}
}
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