diff --git a/hack/make-rules/test-cmd.sh b/hack/make-rules/test-cmd.sh index 893225e38e4..94f33895fa0 100755 --- a/hack/make-rules/test-cmd.sh +++ b/hack/make-rules/test-cmd.sh @@ -2313,8 +2313,9 @@ __EOF__ kubectl-with-retry rollout resume deployment nginx "${kube_flags[@]}" # The resumed deployment can now be rolled back kubectl rollout undo deployment nginx "${kube_flags[@]}" - # Check that the new replica set (nginx-618515232) has all old revisions stored in an annotation - kubectl get rs nginx-618515232 -o yaml | grep "deployment.kubernetes.io/revision-history: 1,3" + # Check that the new replica set has all old revisions stored in an annotation + newrs="$(kubectl describe deployment nginx | grep NewReplicaSet | awk '{print $2}')" + kubectl get rs "${newrs}" -o yaml | grep "deployment.kubernetes.io/revision-history: 1,3" # Check that trying to watch the status of a superseded revision returns an error ! kubectl rollout status deployment/nginx --revision=3 cat hack/testdata/deployment-revision1.yaml | $SED "s/name: nginx$/name: nginx2/" | kubectl create -f - "${kube_flags[@]}"