Commit Graph

48 Commits

Author SHA1 Message Date
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
Hunter Haugen
ec66670995 Add helper to install puppet/pe/puppet-agent 2015-06-11 16:54:34 -07:00
Justin Stoller
ba817d0d56 (maint) allow setting PUPPET_VESION in acceptance 2015-06-08 22:16:59 -07: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
Lutz Behnke
e22aa3a36a add support for ubuntu vivid (15.04) using openjdk-8
add acceptance test node without really understanding what it does.
add test for distribution type jdk for Ubuntu vivid
2015-04-01 08:16:07 +02:00
Colleen Murphy
5b45d1fede Update rspec tests for rspec-puppet 2
This patch uses `catalogue` instead of `subject` for the raise_error
matcher since `subject` is not evaluated the way it used to be. We also
unpin rspec-puppet.
2015-03-19 14:09:58 -07:00
Eli Young
8dd715a599 Improve java_version fact maintainability 2015-02-09 15:26:53 -08:00
Morgan Haskel
97b48f12d1 Merge pull request #104 from cottsay/master
Fix Fedora 21+ package name
2015-02-06 18:46:22 +01: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
Scott K Logan
98447f03e7 Fix Fedora 21+ package name
java-1.7.0-openjdk is no longer available in Fedora 21+
2015-01-31 22:50:06 -08:00
Hunter Haugen
b138633c4e Merge pull request #92 from petems/MODULES-1570-java_version_facts
MODULES-1570 Java Version facts
2015-01-08 09:03:53 -08: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
Richard Pijnenburg
3b290abddf Use --jre-headless instead of --jre
In some cases it can cause problems and report these kind of errors:

$ update-java-alternatives -s /usr/lib/jvm/java-1.7.0-openjdk-amd64 --jre
update-alternatives: error: no alternatives for policytool
update-alternatives: error: no alternatives for policytool
2015-01-07 22:51:26 +00:00
Morgan Haskel
619cdf99c4 Acceptance test fix for wheezy 2014-12-29 17:13:06 -08:00
Morgan Haskel
ee9d955eeb Test fix for RHEL with alternatives
Alternatives support was added in #89, but the test wasn't updated to
expect failures when invalid alternatives are passed to RHEL systems.
2014-12-29 09:53:03 -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
Travis Fields
16ec5a40a7 Merge pull request #93 from mhaskel/modulesync
Sync files with modulesync
2014-12-26 16:39:23 -08:00
rmenezes
0c2e8bb610 Add Java alternatives for RHEL based distros. 2014-12-26 15:10:37 -08:00
Morgan Haskel
c660622b82 Sync files with modulesync 2014-12-26 10:58:14 -08:00
Travis Fields
abad30de06 Update defaults for SLES
Fixed test issues with solaris-11 and added support for sles-12
2014-11-05 16:04:52 -08:00
Travis Fields
d1d1ec2327 Remove puppet_module_install in favor of copy_module_to 2014-09-10 11:30:52 -07:00
Hunter Haugen
fb38145cd4 Ah hah, got it 2014-08-28 18:33:56 -07:00
Hunter Haugen
4cf0088f91 Maybe spec filters work like this 2014-08-28 18:21:09 -07:00
Hunter Haugen
30a5311d73 Spec typo 2014-08-28 17:53:11 -07:00
Hunter Haugen
096196bd89 Remove Sci 7 from readme and update oracle linux tests for ubuntu 2014-08-28 16:38:23 -07:00
Morgan Haskel
f519b26dbc Update spec_helper for consistency 2014-08-28 17:35:30 -04:00
Hunter Haugen
e4628a345c Debian should fail with incorrect java_alternative 2014-08-22 14:42:15 -07:00
Hunter Haugen
f09c5e9a17 Add more tests and make solaris pass 2014-08-22 13:27:11 -07:00
Hunter Haugen
dcdc96187d Remove empty package test and validation
an empty variable is apparently the same thing as undef, which causes
the packages to be selected as usual.
2014-08-13 13:11:28 -07:00
Hunter Haugen
5683eaf74e Add some validation and more tests 2014-08-13 12:17:41 -07:00
Hunter Haugen
502c94b8ed Add acceptance tests
This includes tests for installing openjdk jdk & jre on most PE
supported platforms.
2014-08-12 09:10:59 -07:00
Brett Porter
304a4343ab Support Scientific Linux
Addresses issue #37
2013-08-05 13:53:58 +10:00
Matthaus Owens
bf7edcf299 Update java packages for Fedora systems
The java package on Fedora is currently java-1.7.0-openjdk for their basic
java, and java-1.7.0-openjdk-devel for a development set. Fedora 16 had
java-1.6.0-openjdk, but it has been EOL for a long time. This commit updates
the default java for Fedora to the 1.7.0 package.
2013-08-01 12:15:12 -07:00
Matthaus Owens
3556af3a49 Trailing whitespace cleanup. 2013-08-01 12:15:08 -07:00
Krzysztof Suszyński
2d70d838ba Adding support for Oracle Enterprise Linux with spec tests 2013-07-26 14:21:32 +02:00
Brett Porter
e73f175f3a Merge branch 'master' of https://github.com/rombert/puppetlabs-java into rombert-master
Conflicts:
	manifests/params.pp
2013-07-13 13:22:44 +10:00
Brett Porter
9188f0e15a Merge pull request #29 from actionjack/master
Added support for Amazon linux
2013-07-12 20:11:22 -07:00
Sharif Nassar
ad93b44405 Support multiple JVM, and Debian alternatives.
Add ability to customize which JVM is installed on Debian.
Additionally, configure alternatives on Debian.
2013-06-20 16:29:20 -07:00
Martin Jackson
9fcf5d1a23 Added support Amazon Linux using facter >= 1.7.x. Fixes 1. 2013-06-20 11:03:01 +01:00
Robert Munteanu
3ac6dd5966 Add support for OpenSUSE 2013-06-10 17:44:27 +03:00
Brett Porter
cde7046e99 Merge branch 'fixes_for_centos_versions' of https://github.com/garethr/puppetlabs-java into garethr-fixes_for_centos_versions
Conflicts:
	Modulefile
	README.markdown
	manifests/init.pp
	spec/spec_helper.rb
2013-06-02 21:47:19 -07:00
Reid Vandewiele
b46f256b11 Remove cruft and bumb version number 2013-04-04 20:19:37 -07:00
Gareth Rushgrove
4b54bab0cb add tests for the current an expected centos behaviour 2013-04-02 16:07:20 +01:00
Jeff McCune
55a2ab8b19 Initial commit 2011-05-23 18:12:37 -07:00