mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
test/e2e: fix upgrade test to not run describe cross version
Signed-off-by: Jess Frazelle <me@jessfraz.com>
This commit is contained in:
@@ -532,6 +532,9 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
|
|||||||
framework.KubeDescribe("Kubectl describe", func() {
|
framework.KubeDescribe("Kubectl describe", func() {
|
||||||
It("should check if kubectl describe prints relevant information for rc and pods [Conformance]", func() {
|
It("should check if kubectl describe prints relevant information for rc and pods [Conformance]", func() {
|
||||||
framework.SkipUnlessServerVersionGTE(nodePortsOptionalVersion, c)
|
framework.SkipUnlessServerVersionGTE(nodePortsOptionalVersion, c)
|
||||||
|
kv, err := framework.KubectlVersion()
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
framework.SkipUnlessServerVersionGTE(kv, c)
|
||||||
controllerJson := readTestFileOrDie(redisControllerFilename)
|
controllerJson := readTestFileOrDie(redisControllerFilename)
|
||||||
serviceJson := readTestFileOrDie(redisServiceFilename)
|
serviceJson := readTestFileOrDie(redisServiceFilename)
|
||||||
|
|
||||||
@@ -543,46 +546,23 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
|
|||||||
waitForOrFailWithDebug(1)
|
waitForOrFailWithDebug(1)
|
||||||
|
|
||||||
// Pod
|
// Pod
|
||||||
// this is terrible but we want 1.4.0 alpha to count as well
|
forEachPod(func(pod api.Pod) {
|
||||||
classVersion, err := framework.KubectlVersionGTE(version.MustParse("v1.4.0-alpha"))
|
output := framework.RunKubectlOrDie("describe", "pod", pod.Name, nsFlag)
|
||||||
Expect(err).NotTo(HaveOccurred())
|
requiredStrings := [][]string{
|
||||||
if classVersion {
|
{"Name:", "redis-master-"},
|
||||||
forEachPod(func(pod api.Pod) {
|
{"Namespace:", ns},
|
||||||
output := framework.RunKubectlOrDie("describe", "pod", pod.Name, nsFlag)
|
{"Node:"},
|
||||||
requiredStrings := [][]string{
|
{"Labels:", "app=redis"},
|
||||||
{"Name:", "redis-master-"},
|
{"role=master"},
|
||||||
{"Namespace:", ns},
|
{"Status:", "Running"},
|
||||||
{"Node:"},
|
{"IP:"},
|
||||||
{"Labels:", "app=redis"},
|
{"Controllers:", "ReplicationController/redis-master"},
|
||||||
{"role=master"},
|
{"Image:", redisImage},
|
||||||
{"Status:", "Running"},
|
{"State:", "Running"},
|
||||||
{"IP:"},
|
{"QoS Class:", "BestEffort"},
|
||||||
{"Controllers:", "ReplicationController/redis-master"},
|
}
|
||||||
{"Image:", redisImage},
|
checkOutput(output, requiredStrings)
|
||||||
{"State:", "Running"},
|
})
|
||||||
{"QoS Class:", "BestEffort"},
|
|
||||||
}
|
|
||||||
checkOutput(output, requiredStrings)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
forEachPod(func(pod api.Pod) {
|
|
||||||
output := framework.RunKubectlOrDie("describe", "pod", pod.Name, nsFlag)
|
|
||||||
requiredStrings := [][]string{
|
|
||||||
{"Name:", "redis-master-"},
|
|
||||||
{"Namespace:", ns},
|
|
||||||
{"Node:"},
|
|
||||||
{"Labels:", "app=redis"},
|
|
||||||
{"role=master"},
|
|
||||||
{"Status:", "Running"},
|
|
||||||
{"IP:"},
|
|
||||||
{"Controllers:", "ReplicationController/redis-master"},
|
|
||||||
{"Image:", redisImage},
|
|
||||||
{"State:", "Running"},
|
|
||||||
{"QoS Tier:", "BestEffort"},
|
|
||||||
}
|
|
||||||
checkOutput(output, requiredStrings)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rc
|
// Rc
|
||||||
output := framework.RunKubectlOrDie("describe", "rc", "redis-master", nsFlag)
|
output := framework.RunKubectlOrDie("describe", "rc", "redis-master", nsFlag)
|
||||||
|
Reference in New Issue
Block a user