(FACT-1754) search for matching line with java version#257
Merged
tphoney merged 5 commits intopuppetlabs:masterfrom Oct 2, 2017
Merged
Conversation
do not just try to read java version from first line, but search for the matching line from java output
Contributor
Author
|
CI checks failed, will improve code. |
Contributor
|
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
Contributor
|
There still seems to be issues on the unit tests. getting closer 👍 |
Contributor
Author
|
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 . :-) |
Contributor
|
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
Contributor
Author
|
Code improved, CI checks now succeed. |
Contributor
|
Great work @shuebnersr !!! |
Contributor
Author
|
You're welcome, @tphoney! And thanks a lot for the support and the great tool! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.