fixes upgrade tests for kubectl skew from 1.3 to master

Signed-off-by: Jess Frazelle <me@jessfraz.com>
This commit is contained in:
Jess Frazelle 2016-08-31 13:00:30 -07:00
parent 1d0f168158
commit 7ca6673e01
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3

View File

@ -541,24 +541,48 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
By("Waiting for Redis master to start.") By("Waiting for Redis master to start.")
waitForOrFailWithDebug(1) waitForOrFailWithDebug(1)
// Pod // Pod
forEachPod(func(pod api.Pod) { // this is terrible but we want 1.4.0 alpha to count as well
output := framework.RunKubectlOrDie("describe", "pod", pod.Name, nsFlag) classVersion, err := framework.KubectlVersionGTE(version.MustParse("v1.4.0-alpha"))
requiredStrings := [][]string{ Expect(err).NotTo(HaveOccurred())
{"Name:", "redis-master-"}, if classVersion {
{"Namespace:", ns}, forEachPod(func(pod api.Pod) {
{"Node:"}, output := framework.RunKubectlOrDie("describe", "pod", pod.Name, nsFlag)
{"Labels:", "app=redis"}, requiredStrings := [][]string{
{"role=master"}, {"Name:", "redis-master-"},
{"Status:", "Running"}, {"Namespace:", ns},
{"IP:"}, {"Node:"},
{"Controllers:", "ReplicationController/redis-master"}, {"Labels:", "app=redis"},
{"Image:", redisImage}, {"role=master"},
{"State:", "Running"}, {"Status:", "Running"},
{"QoS Class:", "BestEffort"}, {"IP:"},
} {"Controllers:", "ReplicationController/redis-master"},
checkOutput(output, requiredStrings) {"Image:", redisImage},
}) {"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)