Skip to content

Commit

Permalink
fix: remove Otel resources before running other Otel test.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jvanz committed Dec 13, 2024
1 parent db4c308 commit e4e19d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/opentelemetry-remote-collector-tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e4e19d9

Please sign in to comment.