Skip to content

Commit

Permalink
[bitnami/java] tests: 1.8 branch shows version on stderr (#77134)
Browse files Browse the repository at this point in the history
  • Loading branch information
juan131 authored Feb 10, 2025
1 parent 6a01e65 commit f54e605
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .vib/java-min/goss/java-min.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ command:
check-java-version:
exec:
- java
{{- if regexMatch "^1.8.+" .Env.APP_VERSION }}
{{- if regexMatch "^1.8.+" .Env.APP_VERSION }}
- -version
exit-status: 0
# Replace "-" with "_" in the version string
stdout:
- {{ .Env.APP_VERSION | replace "-" "_" }}
{{- else }}
# APP_VERSION follows format 1.8.XXX-Y
# while stdout shows 1.8.0_XXX
stderr:
- /openjdk version "{{ (semver .Env.APP_VERSION).Major }}.{{ (semver .Env.APP_VERSION).Minor }}.*_{{ (semver .Env.APP_VERSION).Patch }}"/
{{- else }}
- --version
exit-status: 0
# Replace "-" with "+" in the version string
stdout:
- {{ .Env.APP_VERSION | replace "-" "+" }}
{{- end }}
{{- end }}
check-hello-world:
exec:
- java
Expand Down

0 comments on commit f54e605

Please sign in to comment.