-
Notifications
You must be signed in to change notification settings - Fork 40
Fix CosmosDB CI when running integration test with JDK11+ #1919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # .github/workflows/ci.yaml
f4f0b30 to
5443770
Compare
| & ${env:JAVA_HOME}/bin/keytool.exe -keystore ${env:JAVA_HOME}/jre/lib/security/cacerts -storepass 'changeit' -list -alias cosmos_emulator | ||
| # Setting the keystore option differs between Java 8 and Java 11+ | ||
| if ( ${env:INT_TEST_JAVA_RUNTIME_VERSION} -eq '8' ) { | ||
| $keystore = "-keystore", "${env:JAVA_HOME}/jre/lib/security/cacerts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $keystore = "-keystore", "${env:JAVA_HOME}/jre/lib/security/cacerts" | |
| $keystore = "-keystore ${env:JAVA_HOME}/jre/lib/security/cacerts" |
Writing this variable as a single string will not expand correctly in Powershell because it does not recognize -keystore as being an option for the keytool.exe command.
Instead, we need to separate the option from its value by storing it as an array in the $keystore variable.
It took me some time to figure it out 😓
komamitsu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!!
brfrn169
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
feeblefakie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
Description
The CosmosDB CI fails when using JDK11+ as the runtime for the integration test. This is because the way to import TLS/SSL certificate in the Java "cacerts" keystore is not supported for JDK11+.
Related issues and/or PRs
Changes made
Checklist
Additional notes (optional)
N/A
Release notes
N/A