[bitnami/jaeger] Fix tests for v1/v2 compatibility (pt 2) (#83779)

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>
This commit is contained in:
Miguel Ruiz 2025-07-29 10:10:01 +02:00 committed by GitHub
parent fb60fa0def
commit e1dc10028d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 7 deletions

View File

@ -2,25 +2,31 @@
# SPDX-License-Identifier: APACHE-2.0
command:
check-jaeger:
exec: timeout --preserve-status 5 jaeger-all-in-one
# NOTE: Tests are currently duplicated because we need to support both Jaeger v1 and v2
# Once v1 is deprecated, remove legacy tests and simplify when possible
check-legacy-jaeger:
exec: bash -c "if [[ \"${APP_VERSION}\" == \"1.\"* ]]; then timeout --preserve-status 5 jaeger-all-in-one; else echo \"Server created\" > /dev/stderr; fi"
exit-status: 0
stderr:
- "Server created"
# HACK: Temporary fix for Jaeger v1 and v2 binaries
check-jaeger:
#exec: timeout --preserve-status 5 jaeger
exec: bash -c "if [[ \"${APP_VERSION}\" != \"1.\"* ]]; then timeout --preserve-status 5 jaeger; else echo \"Everything is ready\" > /dev/stderr; fi"
exit-status: 0
stderr:
- "Everything is ready"
# Once v1 is deprecated, use regular check-app-version.yaml and check-binaries.yaml tests
check-app-version:
exec: bash -c "if [[ \"${APP_VERSION}\" == \"1.\"* ]]; then jaeger-all-in-one version; else jaeger-jaeger version; fi"
exec: bash -c "if [[ \"${APP_VERSION}\" == \"1.\"* ]]; then jaeger-all-in-one version; else jaeger version; fi"
exit-status: 0
stdout:
- "{{ .Env.APP_VERSION }}"
# Jaeger v1
# Once v1 is deprecated, use regular check-binaries.yaml tests
{{- range $binary := .Vars.binaries }}
check-{{ $binary }}-binary-v1:
check-legacy-{{ $binary }}-binary:
exec: bash -c "if [[ \"${APP_VERSION}\" == \"1.\"* ]]; then which {{ $binary }}; else exit 0; fi"
exit-status: 0
{{- end }}
# Jaeger v2
check-jaeger-binary:
exec: bash -c "if [[ \"${APP_VERSION}\" != \"1.\"* ]]; then which jaeger; else exit 0; fi"
exit-status: 0