From e4e19d99f657c8add52645773edf2d107b8b46b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Guilherme=20Vanz?= Date: Fri, 13 Dec 2024 14:29:36 -0300 Subject: [PATCH] fix: remove Otel resources before running other Otel test. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Depending the order of execution of the OpenTelemetry tests they can fail because one test is trying to install/upgrade a resource which are in terminating state. It's possible to see error messages like: "create not allowed while custom resource definition is terminating" To workaround this problem, this commit updates the test that verify the communication with remote Otel collector to removes the resources created during the test as well. Signed-off-by: José Guilherme Vanz --- tests/opentelemetry-remote-collector-tests.bats | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/opentelemetry-remote-collector-tests.bats b/tests/opentelemetry-remote-collector-tests.bats index fd16c05..fb674a1 100644 --- a/tests/opentelemetry-remote-collector-tests.bats +++ b/tests/opentelemetry-remote-collector-tests.bats @@ -14,6 +14,9 @@ teardown_file() { kubectl delete admissionpolicies,clusteradmissionpolicies --all -A kubectl delete pod nginx-privileged nginx-unprivileged --ignore-not-found + kubectl delete --wait --ignore-not-found -f $RESOURCES_DIR/opentelemetry-jaeger.yaml + kubectl delete --wait --ignore-not-found --namespace $NAMESPACE -f $RESOURCES_DIR/otel-collector-deployment.yaml + # Remove installed apps helm uninstall --wait -n jaeger jaeger-operator helm uninstall --wait -n prometheus prometheus