diff --git a/tests/e2e/ambient/ambient_test.go b/tests/e2e/ambient/ambient_test.go index c17b6a2de..5b1d15bb5 100644 --- a/tests/e2e/ambient/ambient_test.go +++ b/tests/e2e/ambient/ambient_test.go @@ -84,6 +84,10 @@ kind: IstioCNI metadata: name: default spec: + values: + cni: + ambient: + dnsCapture: true profile: ambient version: %s namespace: %s` @@ -102,6 +106,21 @@ spec: }).Should(Succeed(), "CNI DaemonSet Pods are not Available") Success("CNI DaemonSet is deployed in the namespace and Running") }) + + It("uses the configured values in the istio-cni-config config map", func(ctx SpecContext) { + cm := corev1.ConfigMap{} + + Eventually(func() error { + if _, err := common.GetObject(ctx, cl, kube.Key("istio-cni-config", istioCniNamespace), &cm); err != nil { + return err + } + + if val, ok := cm.Data["AMBIENT_DNS_CAPTURE"]; !ok || val != "true" { + return fmt.Errorf("expected AMBIENT_DNS_CAPTURE=true, got %q", val) + } + return nil + }).Should(Succeed(), "Expected 'AMBIENT_DNS_CAPTURE' to be set to 'true'") + }) }) When("the Istio CR is created with ambient profile", func() {