-
Notifications
You must be signed in to change notification settings - Fork 270
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
(FACT-1754) search for matching line with java version #257
(FACT-1754) search for matching line with java version #257
Conversation
do not just try to read java version from first line, but search for the matching line from java output
|
CI checks failed, will improve code. |
|
Thanks for the PR, keep up the good work @shuebnersr ! |
mock Facter::Util::Resolution.which('java') for the "other systems" test; before it was not mocked and was based on Java being installed on the test system or not
…when_java_not_installed Fact1760 test for java version when java not installed
|
There still seems to be issues on the unit tests. getting closer 👍 |
|
Fixed the unit test for "other systems" (see above), but one of the other two tests is also broken. Still on it, never used Ruby before . :-) |
|
Many thanks for your continued persistence @shuebnersr |
Use value of variable instead of return statement Extended unit test for checking handling of JAVA_TOOL_OPTIONS
|
Code improved, CI checks now succeed. |
|
Great work @shuebnersr !!! |
|
You're welcome, @tphoney! And thanks a lot for the support and the great tool! |
FACT-1754: fact "java_version" fails when JAVA_TOOL_OPTIONS is used
Solution: do not just try to read java version from first line, but search for the matching line from java output.
Note: as in the original code, the fix appears three times - I think it is on purpose to not introduce new functions in this scope.