File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed
test/openshift/e2e/ginkgo/fixture/deployment Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -85,23 +85,21 @@ func RemoveEnv(depl *appsv1.Deployment, key string) {
8585 Update (depl , func (d * appsv1.Deployment ) {
8686 containers := d .Spec .Template .Spec .Containers
8787
88- Expect ( containers ). Should ( HaveLen ( 1 ))
89-
90- newEnvVars := []corev1. EnvVar {}
88+ for idc := range containers {
89+ newEnvVars := []corev1. EnvVar {}
90+ for idx := range containers [ idc ]. Env {
9191
92- for idx := range containers [0 ].Env {
92+ currEnv := containers [idc ].Env [ idx ]
9393
94- currEnv := containers [0 ].Env [idx ]
95-
96- if currEnv .Name == key {
97- // don't add, thus causing it to be removed
98- } else {
99- newEnvVars = append (newEnvVars , currEnv )
94+ if currEnv .Name == key {
95+ // don't add, thus causing it to be removed
96+ } else {
97+ newEnvVars = append (newEnvVars , currEnv )
98+ }
10099 }
101- }
102-
103- containers [0 ].Env = newEnvVars
104100
101+ containers [idc ].Env = newEnvVars
102+ }
105103 })
106104
107105}
You can’t perform that action at this time.
0 commit comments