33 lines
1.4 KiB
YAML
33 lines
1.4 KiB
YAML
# Copyright Broadcom, Inc. All Rights Reserved.
|
|
# SPDX-License-Identifier: APACHE-2.0
|
|
|
|
command:
|
|
# 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"
|
|
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 version; fi"
|
|
exit-status: 0
|
|
stdout:
|
|
- "{{ .Env.APP_VERSION }}"
|
|
# Once v1 is deprecated, use regular check-binaries.yaml tests
|
|
{{- range $binary := .Vars.binaries }}
|
|
check-legacy-{{ $binary }}-binary:
|
|
exec: bash -c "if [[ \"${APP_VERSION}\" == \"1.\"* ]]; then which {{ $binary }}; else exit 0; fi"
|
|
exit-status: 0
|
|
{{- end }}
|
|
check-jaeger-binary:
|
|
exec: bash -c "if [[ \"${APP_VERSION}\" != \"1.\"* ]]; then which jaeger; else exit 0; fi"
|
|
exit-status: 0
|