Commit Graph

22 Commits

Author SHA1 Message Date
tphoney
e53b8bb563 FM-6634 rubocop fixes 2017-12-06 15:47:27 +00:00
Will Meek
dec5136e11 Cleanup ruby code via rubocop
This commit will add code cleanup as corrected
and alerted by rubocop. It also adds rules to
execute rubocop on Travis.
2017-11-21 14:31:45 +00:00
Will Meek
e1df6498c7 Fix facter unit test when using realpath 2017-11-15 14:37:42 +00:00
Sebastian Reitenbach
e50eb64614 do not use unportable readlink utility to find the java_default_home,
use Ruby in a more portable fashion.

adapt tests as well
2017-11-15 14:37:42 +00:00
shuebnersr
b7bdf96252 Fixed search for matching line with java version
Use value of variable instead of return statement
Extended unit test for checking handling of JAVA_TOOL_OPTIONS
2017-10-01 15:15:01 +02:00
shuebnersr
578eb951ea fix java_version test for other systems
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
2017-09-22 11:50:41 +02:00
Hunter Haugen
49369bd48c Merge pull request #215 from vrtdev/bugfix/MODULES-4368-java_default_home-invalid-fact
See: https://tickets.puppetlabs.com/browse/MODULES-4368
2017-06-07 16:15:47 -07:00
Vadym Chepkov
797677caf7 [MODULES-4736] Increase Xmx setting for java_version fact
Previous value of 8M caused JVM to crash on servers with more then 40G of RAM
Tested on databases servers up to 1.5T of RAM, 12M seems to be sufficient
2017-04-19 07:47:07 -04:00
Jan Vansteenkiste
20960ddb7f MODULES-4368: Add a test case for the issue 2017-02-01 08:10:15 +01:00
Jan Vansteenkiste
b5b03e5c00 (MODULES-4050) Check if jre is in the path before subsubdir 2016-11-07 16:06:36 +01:00
Alex Harvey
4775718a2f Fix up rspec deprecation warnings. 2016-04-12 22:52:51 +10:00
Fabien Wernli
9c154890a3 add two facts: java_libjvm_path java_default_home
* dirname containing base directory of java
* e.g. java binary is `${::java_default_home}/jre/bin/java`

* dirname containing `libjvm.so`
* Most people will use this for LD_LIBRARY_PATH
2015-12-01 12:13:11 +01:00
David Schmitt
dadc7a6c22 (MODULES-2637) Checks java actually installed
The other method for running which java doesn't work on OSX, as java is installed as an empty shim when not installed in the base OSX image:

```
vagrant:~ vagrant$ java
No Java runtime present, requesting install.
vagrant:~ vagrant$ /usr/libexec/java_home --failfast
Unable to find any JVMs matching version "(null)".
vagrant:~ vagrant$
```

We can use the `/usr/libexec/java_home --failfast` command to check if
java is actually present first.

Originally-by: Peter Souter <peter.souter@puppetlabs.com>
2015-10-01 19:09:32 +01:00
David Schmitt
3645364e5b (MAINT) declare an exclusion filter for the tests using with_env on facter 1.6
The with_env function is not available in facter 1.6 and OpenBSD is not
supported.
2015-10-01 19:09:32 +01:00
Jan Vansteenkiste
8bef423733 Fix rspec deprecation warnings. .should -> expect().to 2015-09-29 06:44:30 +02:00
Jonathan Tripathy
232258f290 Updated travisci file to remove allow_failures on Puppet 4 2015-06-08 14:24:41 +01:00
Sebastian Reitenbach
5815242f8e Add support for OpenBSD, and also add some regression tests.
Add info about OpenBSD support to README.md and metadata.json
Add a note about OpenBSD java_version fact to README.markdown.
Fixup wording on context in one of the java patch level regression tests.
No mentioning of OpenBSD in metdata.json

Cleanup wording of context as suggested by @elyscape
update contexts as suggested by @elyscape
2015-04-23 12:29:11 +02:00
Eli Young
8dd715a599 Improve java_version fact maintainability 2015-02-09 15:26:53 -08:00
Oliver Falk
79805000cc (MODULES-1749) Update java_version fact...
with maximum memory size

Add -Xmx8m to make large systems happy.
2015-02-06 12:47:23 +00:00
Peter Souter
46524ee6eb (MODULES-1570) Stub exec for older Facter
Otherwise this spec will fail with

```
Mocha::ExpectationError:
unexpected invocation: Facter::Util::Resolution.which('uname')
```
2015-01-08 08:27:56 -08:00
Peter Souter
cd3ac1ee46 (MODULES-1570) Add java_major_version fact
Gives the major version of the Java release (ie. Java 1.7.0_71, major version is 7)

We also want to specifically return nil when java not present
2015-01-07 15:42:23 -08:00
Peter Souter
378dcc7802 (MODULES-1570) TDD Style - Add specs first
Facter unit tests to check resolution of Java version
2014-12-29 15:13:47 +00:00