diff --git a/cmd/e2e/test_utils.go b/cmd/e2e/test_utils.go index 8f573fee..1ec3e020 100644 --- a/cmd/e2e/test_utils.go +++ b/cmd/e2e/test_utils.go @@ -274,10 +274,12 @@ func waitForSTSCondition(t *testing.T, stsName string, conditions ...func(sts *a func createEDS(name string, spec zv1.ElasticsearchDataSetSpec) error { myspec := spec.DeepCopy() - myspec.Template.Spec.Containers[0].Env = append(myspec.Template.Spec.Containers[0].Env, v1.EnvVar{ - Name: "node.attr.group", - Value: name, - }) + for i, env := range myspec.Template.Spec.Containers[0].Env { + if env.Name == "node.attr.group" { + myspec.Template.Spec.Containers[0].Env[i].Value = name + break + } + } eds := &zv1.ElasticsearchDataSet{ ObjectMeta: metav1.ObjectMeta{ Name: name, diff --git a/e2e.sh b/e2e.sh index b729207c..f651d853 100755 --- a/e2e.sh +++ b/e2e.sh @@ -2,7 +2,7 @@ # Simple script for running the e2e test from your local development machine # against "some" cluster. -# You need to run `kubectl proxy` in a different terminat before running the +# You need to run `kubectl proxy` in a different terminal before running the # script. NAMESPACE="${NAMESPACE:-"es-operator-e2e-$(date +%s)"}"