mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
Merge pull request #32143 from jfrazelle/fix-upgrade
Automatic merge from submit-queue test/e2e: fix upgrade test to not run describe cross version <!-- Thanks for sending a pull request! Here are some tips for you: 1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md 2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md 3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes --> **What this PR does / why we need it**: Better fix for #31642 replaces #31987 **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: <!-- Steps to write your release note: 1. Use the release-note-* labels to set the release note state (if you have access) 2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. --> ```release-note NONE ```
This commit is contained in:
commit
a82c716e9d
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user