mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
check labels/annotations in the beginning
This commit is contained in:
parent
ff3cb43c30
commit
059e8353b7
@ -69,15 +69,22 @@ var _ = SIGDescribe("Kubectl rollout", func() {
|
||||
}
|
||||
|
||||
origEnv := d.Spec.Template.Spec.Containers[0].Env
|
||||
origLabels := d.Spec.Template.Labels
|
||||
origAnnotations := d.Spec.Template.Annotations
|
||||
|
||||
for _, env := range origEnv {
|
||||
if env.Name == "foo" && env.Value == "bar" {
|
||||
framework.Failf("labeled deployment should not have an env named foo and valued bar at the beginning")
|
||||
}
|
||||
}
|
||||
|
||||
origLabels := d.Spec.Template.Labels
|
||||
if len(origLabels) == 0 {
|
||||
framework.Failf("original labels should not be empty in kubectl rollout test")
|
||||
}
|
||||
|
||||
origAnnotations := d.Spec.Template.Annotations
|
||||
if len(origAnnotations) == 0 {
|
||||
framework.Failf("original annotations should not be empty in kubectl rollout test")
|
||||
}
|
||||
|
||||
// do a small update
|
||||
if _, err = e2ekubectl.RunKubectl(ns, "set", "env", "deployment/httpd-deployment", "foo=bar"); err != nil {
|
||||
framework.Failf("kubectl failed set env for deployment")
|
||||
|
Loading…
Reference in New Issue
Block a user