Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
372b5d939a | ||
|
|
c481a128da | ||
|
|
06f1a56b31 | ||
|
|
236a115ed6 | ||
|
|
e4912e071c | ||
|
|
43133c9a22 | ||
|
|
e94f8521ef | ||
|
|
46e2a3b084 | ||
|
|
6de2b2db55 | ||
|
|
07533d13cd | ||
|
|
484f27a79e | ||
|
|
622c3469a6 | ||
|
|
84bc80d881 | ||
|
|
602d630cf0 | ||
|
|
5a0d540d78 | ||
|
|
c3104ce39b | ||
|
|
3d49162219 | ||
|
|
01e717777f | ||
|
|
d9627f96e8 | ||
|
|
708a94f253 | ||
|
|
e0da673208 | ||
|
|
504fe4c0ff | ||
|
|
f9ea9470d5 | ||
|
|
76cca5c33d | ||
|
|
ab55fc141b | ||
|
|
9551b4284b | ||
|
|
ff922b58dc | ||
|
|
2e16e093f2 |
27
.github/workflows/release.yml
vendored
27
.github/workflows/release.yml
vendored
@@ -6,22 +6,39 @@ on:
|
||||
- 'release'
|
||||
|
||||
jobs:
|
||||
LitmusAcceptance:
|
||||
LitmusAcceptancePuppet5:
|
||||
env:
|
||||
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
|
||||
HONEYCOMB_DATASET: litmus tests
|
||||
runs-on: self-hosted
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
ruby_version: [2.5.x]
|
||||
puppet_gem_version: [~> 6.0]
|
||||
platform: [release_checks]
|
||||
agent_family: ['puppet5', 'puppet6']
|
||||
platform: [release_checks_5]
|
||||
agent_family: ['puppet5']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Litmus Parallel
|
||||
uses: puppetlabs/action-litmus_parallel@master
|
||||
with:
|
||||
platform: ${{ matrix.platform }}
|
||||
agent_family: ${{ matrix.agent_family }}
|
||||
LitmusAcceptancePuppet6:
|
||||
env:
|
||||
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
|
||||
HONEYCOMB_DATASET: litmus tests
|
||||
runs-on: self-hosted
|
||||
strategy:
|
||||
matrix:
|
||||
ruby_version: [2.5.x]
|
||||
puppet_gem_version: [~> 6.0]
|
||||
platform: [release_checks_6]
|
||||
agent_family: ['puppet6']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Litmus Parallel
|
||||
uses: puppetlabs/action-litmus_parallel@master
|
||||
with:
|
||||
@@ -33,7 +50,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
check: [parallel_spec, 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop']
|
||||
check: [spec, 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop']
|
||||
ruby_version: [2.4.x, 2.5.x]
|
||||
puppet_gem_version: [~> 5.0, ~> 6.0]
|
||||
exclude:
|
||||
|
||||
64
.github/workflows/weekly.yml
vendored
Normal file
64
.github/workflows/weekly.yml
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
name: "weekly"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 5 * * 5'
|
||||
|
||||
jobs:
|
||||
LitmusAcceptancePuppet5:
|
||||
env:
|
||||
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
|
||||
HONEYCOMB_DATASET: litmus tests
|
||||
runs-on: self-hosted
|
||||
strategy:
|
||||
matrix:
|
||||
ruby_version: [2.5.x]
|
||||
puppet_gem_version: [~> 6.0]
|
||||
platform: [release_checks_5]
|
||||
agent_family: ['puppet5']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Litmus Parallel
|
||||
uses: puppetlabs/action-litmus_parallel@master
|
||||
with:
|
||||
platform: ${{ matrix.platform }}
|
||||
agent_family: ${{ matrix.agent_family }}
|
||||
LitmusAcceptancePuppet6:
|
||||
env:
|
||||
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
|
||||
HONEYCOMB_DATASET: litmus tests
|
||||
runs-on: self-hosted
|
||||
strategy:
|
||||
matrix:
|
||||
ruby_version: [2.5.x]
|
||||
puppet_gem_version: [~> 6.0]
|
||||
platform: [release_checks_6]
|
||||
agent_family: ['puppet6']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Litmus Parallel
|
||||
uses: puppetlabs/action-litmus_parallel@master
|
||||
with:
|
||||
platform: ${{ matrix.platform }}
|
||||
agent_family: ${{ matrix.agent_family }}
|
||||
Spec:
|
||||
runs-on: self-hosted
|
||||
strategy:
|
||||
matrix:
|
||||
check: [parallel_spec, 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop']
|
||||
ruby_version: [2.5.x]
|
||||
puppet_gem_version: [~> 5.0, ~> 6.0]
|
||||
exclude:
|
||||
- puppet_gem_version: ~> 5.0
|
||||
check: 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop'
|
||||
- ruby_version: 2.5.x
|
||||
puppet_gem_version: ~> 5.0
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Spec Tests
|
||||
uses: puppetlabs/action-litmus_spec@master
|
||||
with:
|
||||
puppet_gem_version: ${{ matrix.puppet_gem_version }}
|
||||
check: ${{ matrix.check }}
|
||||
@@ -40,6 +40,10 @@ Style/BlockDelimiters:
|
||||
Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
|
||||
be consistent then.
|
||||
EnforcedStyle: braces_for_chaining
|
||||
Style/BracesAroundHashParameters:
|
||||
Description: Braces are required by Ruby 2.7. Cop removed from RuboCop v0.80.0.
|
||||
See https://github.com/rubocop-hq/rubocop/pull/7643
|
||||
Enabled: true
|
||||
Style/ClassAndModuleChildren:
|
||||
Description: Compact style reduces the required amount of indentation.
|
||||
EnforcedStyle: compact
|
||||
|
||||
20
.sync.yml
20
.sync.yml
@@ -11,11 +11,21 @@
|
||||
use_litmus: true
|
||||
litmus:
|
||||
provision_list:
|
||||
- travis_deb
|
||||
- travis_ub
|
||||
- travis_el6
|
||||
- travis_el7
|
||||
- ---travis_el
|
||||
- ---travis_el
|
||||
- travis_deb
|
||||
- travis_el6
|
||||
- travis_el7
|
||||
complex:
|
||||
- collection:
|
||||
puppet_collection:
|
||||
- puppet6
|
||||
provision_list:
|
||||
- travis_ub_6
|
||||
- collection:
|
||||
puppet_collection:
|
||||
- puppet5
|
||||
provision_list:
|
||||
- travis_ub_5
|
||||
simplecov: true
|
||||
notifications:
|
||||
slack:
|
||||
|
||||
92
.travis.yml
92
.travis.yml
@@ -16,7 +16,7 @@ script:
|
||||
- 'SIMPLECOV=yes bundle exec rake $CHECK'
|
||||
bundler_args: --without system_tests
|
||||
rvm:
|
||||
- 2.5.3
|
||||
- 2.5.7
|
||||
env:
|
||||
global:
|
||||
- HONEYCOMB_WRITEKEY="7f3c63a70eecc61d635917de46bea4e6",HONEYCOMB_DATASET="litmus tests"
|
||||
@@ -27,28 +27,37 @@ stages:
|
||||
jobs:
|
||||
fast_finish: true
|
||||
include:
|
||||
-
|
||||
before_script:
|
||||
- "bundle exec rake 'litmus:provision_list[travis_ub_6]'"
|
||||
- "bundle exec rake 'litmus:install_agent[puppet6]'"
|
||||
- "bundle exec rake litmus:install_module"
|
||||
bundler_args:
|
||||
env: PLATFORMS=travis_ub_6_puppet6
|
||||
rvm: 2.5.7
|
||||
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
|
||||
services: docker
|
||||
stage: acceptance
|
||||
-
|
||||
before_script:
|
||||
- "bundle exec rake 'litmus:provision_list[travis_ub_5]'"
|
||||
- "bundle exec rake 'litmus:install_agent[puppet5]'"
|
||||
- "bundle exec rake litmus:install_module"
|
||||
bundler_args:
|
||||
env: PLATFORMS=travis_ub_5_puppet5
|
||||
rvm: 2.5.7
|
||||
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
|
||||
services: docker
|
||||
stage: acceptance
|
||||
-
|
||||
before_script:
|
||||
- "bundle exec rake 'litmus:provision_list[travis_deb]'"
|
||||
- "bundle exec rake 'litmus:install_agent[puppet5]'"
|
||||
- "bundle exec rake litmus:install_module"
|
||||
bundler_args:
|
||||
dist: trusty
|
||||
bundler_args:
|
||||
env: PLATFORMS=travis_deb_puppet5
|
||||
rvm: 2.5.3
|
||||
script: ["bundle exec rake litmus:acceptance:parallel"]
|
||||
services: docker
|
||||
stage: acceptance
|
||||
-
|
||||
before_script:
|
||||
- "bundle exec rake 'litmus:provision_list[travis_ub]'"
|
||||
- "bundle exec rake 'litmus:install_agent[puppet5]'"
|
||||
- "bundle exec rake litmus:install_module"
|
||||
bundler_args:
|
||||
dist: trusty
|
||||
env: PLATFORMS=travis_ub_puppet5
|
||||
rvm: 2.5.3
|
||||
script: ["bundle exec rake litmus:acceptance:parallel"]
|
||||
rvm: 2.5.7
|
||||
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
|
||||
services: docker
|
||||
stage: acceptance
|
||||
-
|
||||
@@ -56,11 +65,10 @@ jobs:
|
||||
- "bundle exec rake 'litmus:provision_list[travis_el6]'"
|
||||
- "bundle exec rake 'litmus:install_agent[puppet5]'"
|
||||
- "bundle exec rake litmus:install_module"
|
||||
bundler_args:
|
||||
dist: trusty
|
||||
bundler_args:
|
||||
env: PLATFORMS=travis_el6_puppet5
|
||||
rvm: 2.5.3
|
||||
script: ["bundle exec rake litmus:acceptance:parallel"]
|
||||
rvm: 2.5.7
|
||||
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
|
||||
services: docker
|
||||
stage: acceptance
|
||||
-
|
||||
@@ -68,11 +76,10 @@ jobs:
|
||||
- "bundle exec rake 'litmus:provision_list[travis_el7]'"
|
||||
- "bundle exec rake 'litmus:install_agent[puppet5]'"
|
||||
- "bundle exec rake litmus:install_module"
|
||||
bundler_args:
|
||||
dist: trusty
|
||||
bundler_args:
|
||||
env: PLATFORMS=travis_el7_puppet5
|
||||
rvm: 2.5.3
|
||||
script: ["bundle exec rake litmus:acceptance:parallel"]
|
||||
rvm: 2.5.7
|
||||
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
|
||||
services: docker
|
||||
stage: acceptance
|
||||
-
|
||||
@@ -80,23 +87,10 @@ jobs:
|
||||
- "bundle exec rake 'litmus:provision_list[travis_deb]'"
|
||||
- "bundle exec rake 'litmus:install_agent[puppet6]'"
|
||||
- "bundle exec rake litmus:install_module"
|
||||
bundler_args:
|
||||
dist: trusty
|
||||
bundler_args:
|
||||
env: PLATFORMS=travis_deb_puppet6
|
||||
rvm: 2.5.3
|
||||
script: ["bundle exec rake litmus:acceptance:parallel"]
|
||||
services: docker
|
||||
stage: acceptance
|
||||
-
|
||||
before_script:
|
||||
- "bundle exec rake 'litmus:provision_list[travis_ub]'"
|
||||
- "bundle exec rake 'litmus:install_agent[puppet6]'"
|
||||
- "bundle exec rake litmus:install_module"
|
||||
bundler_args:
|
||||
dist: trusty
|
||||
env: PLATFORMS=travis_ub_puppet6
|
||||
rvm: 2.5.3
|
||||
script: ["bundle exec rake litmus:acceptance:parallel"]
|
||||
rvm: 2.5.7
|
||||
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
|
||||
services: docker
|
||||
stage: acceptance
|
||||
-
|
||||
@@ -104,11 +98,10 @@ jobs:
|
||||
- "bundle exec rake 'litmus:provision_list[travis_el6]'"
|
||||
- "bundle exec rake 'litmus:install_agent[puppet6]'"
|
||||
- "bundle exec rake litmus:install_module"
|
||||
bundler_args:
|
||||
dist: trusty
|
||||
bundler_args:
|
||||
env: PLATFORMS=travis_el6_puppet6
|
||||
rvm: 2.5.3
|
||||
script: ["bundle exec rake litmus:acceptance:parallel"]
|
||||
rvm: 2.5.7
|
||||
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
|
||||
services: docker
|
||||
stage: acceptance
|
||||
-
|
||||
@@ -116,11 +109,10 @@ jobs:
|
||||
- "bundle exec rake 'litmus:provision_list[travis_el7]'"
|
||||
- "bundle exec rake 'litmus:install_agent[puppet6]'"
|
||||
- "bundle exec rake litmus:install_module"
|
||||
bundler_args:
|
||||
dist: trusty
|
||||
bundler_args:
|
||||
env: PLATFORMS=travis_el7_puppet6
|
||||
rvm: 2.5.3
|
||||
script: ["bundle exec rake litmus:acceptance:parallel"]
|
||||
rvm: 2.5.7
|
||||
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
|
||||
services: docker
|
||||
stage: acceptance
|
||||
-
|
||||
@@ -132,7 +124,7 @@ jobs:
|
||||
stage: spec
|
||||
-
|
||||
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
|
||||
rvm: 2.5.3
|
||||
rvm: 2.5.7
|
||||
stage: spec
|
||||
branches:
|
||||
only:
|
||||
|
||||
2
.vscode/extensions.json
vendored
2
.vscode/extensions.json
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"jpogran.puppet-vscode",
|
||||
"puppet.puppet-vscode",
|
||||
"rebornix.Ruby"
|
||||
]
|
||||
}
|
||||
|
||||
11
CHANGELOG.md
11
CHANGELOG.md
@@ -2,6 +2,15 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
|
||||
|
||||
## [v6.3.0](https://github.com/puppetlabs/puppetlabs-java/tree/v6.2.0) (2020-05-27)
|
||||
|
||||
[Full Changelog](https://github.com/puppetlabs/puppetlabs-java/compare/v6.2.0...v6.2.0)
|
||||
|
||||
### Added
|
||||
|
||||
- \(MODULES-10681\) Add option to manage symlink to java::adopt [\#429](https://github.com/puppetlabs/puppetlabs-java/pull/429) ([fraenki](https://github.com/fraenki))
|
||||
- \(IAC-746\) - Add ubuntu 20.04 support [\#428](https://github.com/puppetlabs/puppetlabs-java/pull/428) ([david22swan](https://github.com/david22swan))
|
||||
|
||||
## [v6.2.0](https://github.com/puppetlabs/puppetlabs-java/tree/v6.2.0) (2020-02-18)
|
||||
|
||||
[Full Changelog](https://github.com/puppetlabs/puppetlabs-java/compare/v6.1.0...v6.2.0)
|
||||
@@ -48,6 +57,7 @@ All notable changes to this project will be documented in this file. The format
|
||||
|
||||
- \(FM-8223\) converted to use litmus [\#376](https://github.com/puppetlabs/puppetlabs-java/pull/376) ([tphoney](https://github.com/tphoney))
|
||||
- Add buster support, default to 11 [\#369](https://github.com/puppetlabs/puppetlabs-java/pull/369) ([mhjacks](https://github.com/mhjacks))
|
||||
- Add support for debian buster [\#364](https://github.com/puppetlabs/puppetlabs-java/pull/364) ([TomRitserveldt](https://github.com/TomRitserveldt))
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -72,7 +82,6 @@ All notable changes to this project will be documented in this file. The format
|
||||
|
||||
### Added
|
||||
|
||||
- Add support for debian buster [\#364](https://github.com/puppetlabs/puppetlabs-java/pull/364) ([TomRitserveldt](https://github.com/TomRitserveldt))
|
||||
- \(FM-7921\) - Implement Puppet Strings [\#353](https://github.com/puppetlabs/puppetlabs-java/pull/353) ([david22swan](https://github.com/david22swan))
|
||||
- Update default version & java 8 version from 8u192 to 8u201 [\#347](https://github.com/puppetlabs/puppetlabs-java/pull/347) ([valentinsavenko](https://github.com/valentinsavenko))
|
||||
- Add ability to override basedir and package type for oracle java [\#345](https://github.com/puppetlabs/puppetlabs-java/pull/345) ([fraenki](https://github.com/fraenki))
|
||||
|
||||
2
Gemfile
2
Gemfile
@@ -29,6 +29,8 @@ group :development do
|
||||
gem "puppet-module-win-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw]
|
||||
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw]
|
||||
gem "github_changelog_generator", require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
|
||||
gem 'ed25519', '>= 1.2', '< 2.0'
|
||||
gem 'bcrypt_pbkdf', '>= 1.0', '< 2.0'
|
||||
end
|
||||
|
||||
puppet_version = ENV['PUPPET_GEM_VERSION']
|
||||
|
||||
152
REFERENCE.md
152
REFERENCE.md
@@ -18,7 +18,7 @@ options, even though those are not in the package repositories.
|
||||
|
||||
**Defined types**
|
||||
|
||||
* [`java::adopt`](#javaadopt): Defined Type java::adopt Description Installs OpenJDK Java built with AdoptOpenJDK with the Hotspot JVM. Install one or more versions of Ad
|
||||
* [`java::adopt`](#javaadopt): Install one or more versions of AdoptOpenJDK Java.
|
||||
* [`java::download`](#javadownload): Installs Java from a url location.
|
||||
|
||||
## Classes
|
||||
@@ -106,118 +106,6 @@ Default value: `undef`
|
||||
|
||||
Defined Type java::adopt
|
||||
|
||||
Description
|
||||
Installs OpenJDK Java built with AdoptOpenJDK with the Hotspot JVM.
|
||||
|
||||
Install one or more versions of AdoptOpenJDK Java.
|
||||
|
||||
Currently only Linux RedHat, Amazon and Debian are supported.
|
||||
|
||||
Parameters
|
||||
[*version*]
|
||||
Version of Java to install, e.g. '8' or '9'. Default values for major and minor
|
||||
versions will be used.
|
||||
|
||||
[*version_major*]
|
||||
Major version which should be installed, e.g. '8u101' or '9.0.4'. Must be used together with
|
||||
version_minor.
|
||||
|
||||
[*version_minor*]
|
||||
Minor version which should be installed, e.g. 'b12' (for version = '8') or '11' (for version != '8').
|
||||
Must be used together with version_major.
|
||||
|
||||
[*java_edition*]
|
||||
Type of Java Edition to install, jdk or jre.
|
||||
|
||||
[*ensure*]
|
||||
Install or remove the package.
|
||||
|
||||
[*proxy_server*]
|
||||
Specify a proxy server, with port number if needed. ie: https://example.com:8080. (passed to archive)
|
||||
|
||||
[*proxy_type*]
|
||||
Proxy server type (none|http|https|ftp). (passed to archive)
|
||||
|
||||
[*basedir*]
|
||||
Directory under which the installation will occur. If not set, defaults to
|
||||
/usr/lib/jvm for Debian and /usr/java for RedHat.
|
||||
|
||||
[*manage_basedir*]
|
||||
Whether to manage the basedir directory. Defaults to false.
|
||||
Note: /usr/lib/jvm is managed for Debian by default, separate from this parameter.
|
||||
|
||||
[*package_type*]
|
||||
Type of installation package for specified version of java. java 6 comes
|
||||
in a few installation package flavors and we need to account for them.
|
||||
Optional forced package types: rpm, rpmbin, tar.gz
|
||||
|
||||
Variables
|
||||
[*release_major*]
|
||||
Major version release number for java. Used to construct download URL.
|
||||
|
||||
[*release_minor*]
|
||||
Minor version release number for java. Used to construct download URL.
|
||||
|
||||
[*install_path*]
|
||||
Base install path for specified version of java. Used to determine if java
|
||||
has already been installed.
|
||||
|
||||
[*os*]
|
||||
java OS type.
|
||||
|
||||
[*destination*]
|
||||
Destination directory to save java installer to. Usually /tmp on Linux and
|
||||
C:\TEMP on Windows.
|
||||
|
||||
[*creates_path*]
|
||||
Fully qualified path to java after it is installed. Used to determine if
|
||||
java is already installed.
|
||||
|
||||
[*arch*]
|
||||
java architecture type.
|
||||
|
||||
[*package_name*]
|
||||
Name of the java installation package to download from github.
|
||||
|
||||
[*install_command*]
|
||||
Installation command used to install java. Installation commands
|
||||
differ by package_type. 'bin' types are installed via shell command. 'rpmbin'
|
||||
types have the rpms extracted and then forcibly installed. 'rpm' types are
|
||||
forcibly installed.
|
||||
|
||||
[*spacer*]
|
||||
Spacer to be used in github download url. In major version 8 this is a simple dash
|
||||
in later versions they use a crazy plus sign, which needs to be used in urlencoded
|
||||
format
|
||||
|
||||
[*download_folder_prefix*]
|
||||
Download folder name begins differently depending on the release. After major release
|
||||
8, they have given it a dash. Be aware that even if you want to have a JRE, the folder
|
||||
still begins with "jdk"
|
||||
|
||||
[*release_minor_url*]
|
||||
filled depending on major release. Until major release 8 the minor part needs to be given
|
||||
with a 'b' for build, in later versions it is a underscore or a plus sign, which needs
|
||||
to be stripped for the download url and is replaced with the given spaces (see above)
|
||||
|
||||
[*_package_type*]
|
||||
Helper variable which gets filled depending on parameter package_type
|
||||
|
||||
[*_basedir*]
|
||||
Helper variable which gets filled depending on parameter basedir
|
||||
|
||||
[*_version*]
|
||||
Helper variable which gets filled depending on parameter version
|
||||
|
||||
[*_version_int*]
|
||||
Helper variable which gets the value of $_version converted to integer
|
||||
|
||||
[*_append_jre*]
|
||||
Helper variable which gets filled with the string "-jre" if jre was selected to build the correct install path
|
||||
|
||||
[*_release_minor_package_name*]
|
||||
Helper variable which gets filled with the right minor string depending on the major version
|
||||
|
||||
#### Parameters
|
||||
|
||||
The following parameters are available in the `java::adopt` defined type.
|
||||
@@ -226,7 +114,7 @@ The following parameters are available in the `java::adopt` defined type.
|
||||
|
||||
Data type: `Any`
|
||||
|
||||
|
||||
Install or remove the package.
|
||||
|
||||
Default value: 'present'
|
||||
|
||||
@@ -234,7 +122,7 @@ Default value: 'present'
|
||||
|
||||
Data type: `Any`
|
||||
|
||||
|
||||
Version of Java to install, e.g. '8' or '9'. Default values for major and minor versions will be used.
|
||||
|
||||
Default value: '8'
|
||||
|
||||
@@ -242,7 +130,7 @@ Default value: '8'
|
||||
|
||||
Data type: `Any`
|
||||
|
||||
|
||||
Major version which should be installed, e.g. '8u101' or '9.0.4'. Must be used together with version_minor.
|
||||
|
||||
Default value: `undef`
|
||||
|
||||
@@ -250,7 +138,7 @@ Default value: `undef`
|
||||
|
||||
Data type: `Any`
|
||||
|
||||
|
||||
Minor version which should be installed, e.g. 'b12' (for version = '8') or '11' (for version != '8'). Must be used together with version_major.
|
||||
|
||||
Default value: `undef`
|
||||
|
||||
@@ -258,7 +146,7 @@ Default value: `undef`
|
||||
|
||||
Data type: `Any`
|
||||
|
||||
|
||||
Type of Java Standard Edition to install, jdk or jre.
|
||||
|
||||
Default value: 'jdk'
|
||||
|
||||
@@ -266,7 +154,7 @@ Default value: 'jdk'
|
||||
|
||||
Data type: `Any`
|
||||
|
||||
|
||||
Specify a proxy server, with port number if needed. ie: https://example.com:8080. (passed to archive)
|
||||
|
||||
Default value: `undef`
|
||||
|
||||
@@ -274,7 +162,7 @@ Default value: `undef`
|
||||
|
||||
Data type: `Any`
|
||||
|
||||
|
||||
Proxy server type (none|http|https|ftp). (passed to archive)
|
||||
|
||||
Default value: `undef`
|
||||
|
||||
@@ -282,7 +170,8 @@ Default value: `undef`
|
||||
|
||||
Data type: `Any`
|
||||
|
||||
|
||||
Directory under which the installation will occur. If not set, defaults to
|
||||
/usr/lib/jvm for Debian and /usr/java for RedHat.
|
||||
|
||||
Default value: `undef`
|
||||
|
||||
@@ -290,7 +179,8 @@ Default value: `undef`
|
||||
|
||||
Data type: `Any`
|
||||
|
||||
|
||||
Whether to manage the basedir directory. Defaults to false.
|
||||
Note: /usr/lib/jvm is managed for Debian by default, separate from this parameter.
|
||||
|
||||
Default value: `true`
|
||||
|
||||
@@ -298,7 +188,25 @@ Default value: `true`
|
||||
|
||||
Data type: `Any`
|
||||
|
||||
Type of installation package for specified version of java_se. java_se 6 comes
|
||||
in a few installation package flavors and we need to account for them.
|
||||
Optional forced package types: rpm, rpmbin, tar.gz
|
||||
|
||||
Default value: `undef`
|
||||
|
||||
##### `manage_symlink`
|
||||
|
||||
Data type: `Any`
|
||||
|
||||
Whether to manage a symlink that points to the installation directory. Defaults to false.
|
||||
|
||||
Default value: `false`
|
||||
|
||||
##### `symlink_name`
|
||||
|
||||
Data type: `Any`
|
||||
|
||||
The name for the optional symlink in the installation directory.
|
||||
|
||||
Default value: `undef`
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
team-modules/puppetlabs-java:
|
||||
PreBuild:
|
||||
- source /opt/rh/rh-ruby25/enable
|
||||
- echo "--- LETS update BUNDLER ---"
|
||||
- bundle install --path vendor/bundle --jobs 3
|
||||
Build:
|
||||
- echo "--- PROVISIONING ---"
|
||||
- source /opt/rh/rh-ruby25/enable
|
||||
- bundle exec rake litmus:provision_list[release_checks]
|
||||
- cat inventory.yaml
|
||||
- echo "--- AGENT INSTALLATION ---"
|
||||
- bundle exec rake litmus:install_agent
|
||||
- echo "--- MODULE INSTALLATION ---"
|
||||
- bundle exec rake litmus:install_module
|
||||
- echo "--- TESTS RUNNING ---"
|
||||
- bundle exec rake litmus:acceptance:parallel
|
||||
AfterBuildSuccess:
|
||||
- source /opt/rh/rh-ruby25/enable
|
||||
- bundle exec rake litmus:tear_down
|
||||
AfterBuildFailure:
|
||||
- source /opt/rh/rh-ruby25/enable
|
||||
- bundle exec rake litmus:tear_down
|
||||
CommitData:
|
||||
- RepoType: Git
|
||||
- RepoPath: .
|
||||
@@ -1,116 +1,47 @@
|
||||
# Defined Type java::adopt
|
||||
#
|
||||
# Description
|
||||
# Installs OpenJDK Java built with AdoptOpenJDK with the Hotspot JVM.
|
||||
# @summary
|
||||
# Install one or more versions of AdoptOpenJDK Java.
|
||||
#
|
||||
# Install one or more versions of AdoptOpenJDK Java.
|
||||
# @param ensure
|
||||
# Install or remove the package.
|
||||
#
|
||||
# Currently only Linux RedHat, Amazon and Debian are supported.
|
||||
# @param version
|
||||
# Version of Java to install, e.g. '8' or '9'. Default values for major and minor versions will be used.
|
||||
#
|
||||
# Parameters
|
||||
# [*version*]
|
||||
# Version of Java to install, e.g. '8' or '9'. Default values for major and minor
|
||||
# versions will be used.
|
||||
# @param version_major
|
||||
# Major version which should be installed, e.g. '8u101' or '9.0.4'. Must be used together with version_minor.
|
||||
#
|
||||
# [*version_major*]
|
||||
# Major version which should be installed, e.g. '8u101' or '9.0.4'. Must be used together with
|
||||
# version_minor.
|
||||
# @param version_minor
|
||||
# Minor version which should be installed, e.g. 'b12' (for version = '8') or '11' (for version != '8'). Must be used together with version_major.
|
||||
#
|
||||
# [*version_minor*]
|
||||
# Minor version which should be installed, e.g. 'b12' (for version = '8') or '11' (for version != '8').
|
||||
# Must be used together with version_major.
|
||||
# @param java
|
||||
# Type of Java Standard Edition to install, jdk or jre.
|
||||
#
|
||||
# [*java_edition*]
|
||||
# Type of Java Edition to install, jdk or jre.
|
||||
# @param proxy_server
|
||||
# Specify a proxy server, with port number if needed. ie: https://example.com:8080. (passed to archive)
|
||||
#
|
||||
# [*ensure*]
|
||||
# Install or remove the package.
|
||||
# @param proxy_type
|
||||
# Proxy server type (none|http|https|ftp). (passed to archive)
|
||||
#
|
||||
# [*proxy_server*]
|
||||
# Specify a proxy server, with port number if needed. ie: https://example.com:8080. (passed to archive)
|
||||
# @param basedir
|
||||
# Directory under which the installation will occur. If not set, defaults to
|
||||
# /usr/lib/jvm for Debian and /usr/java for RedHat.
|
||||
#
|
||||
# [*proxy_type*]
|
||||
# Proxy server type (none|http|https|ftp). (passed to archive)
|
||||
# @param manage_basedir
|
||||
# Whether to manage the basedir directory. Defaults to false.
|
||||
# Note: /usr/lib/jvm is managed for Debian by default, separate from this parameter.
|
||||
#
|
||||
# [*basedir*]
|
||||
# Directory under which the installation will occur. If not set, defaults to
|
||||
# /usr/lib/jvm for Debian and /usr/java for RedHat.
|
||||
# @param package_type
|
||||
# Type of installation package for specified version of java_se. java_se 6 comes
|
||||
# in a few installation package flavors and we need to account for them.
|
||||
# Optional forced package types: rpm, rpmbin, tar.gz
|
||||
#
|
||||
# [*manage_basedir*]
|
||||
# Whether to manage the basedir directory. Defaults to false.
|
||||
# Note: /usr/lib/jvm is managed for Debian by default, separate from this parameter.
|
||||
# @param manage_symlink
|
||||
# Whether to manage a symlink that points to the installation directory. Defaults to false.
|
||||
#
|
||||
# [*package_type*]
|
||||
# Type of installation package for specified version of java. java 6 comes
|
||||
# in a few installation package flavors and we need to account for them.
|
||||
# Optional forced package types: rpm, rpmbin, tar.gz
|
||||
#
|
||||
# Variables
|
||||
# [*release_major*]
|
||||
# Major version release number for java. Used to construct download URL.
|
||||
#
|
||||
# [*release_minor*]
|
||||
# Minor version release number for java. Used to construct download URL.
|
||||
#
|
||||
# [*install_path*]
|
||||
# Base install path for specified version of java. Used to determine if java
|
||||
# has already been installed.
|
||||
#
|
||||
# [*os*]
|
||||
# java OS type.
|
||||
#
|
||||
# [*destination*]
|
||||
# Destination directory to save java installer to. Usually /tmp on Linux and
|
||||
# C:\TEMP on Windows.
|
||||
#
|
||||
# [*creates_path*]
|
||||
# Fully qualified path to java after it is installed. Used to determine if
|
||||
# java is already installed.
|
||||
#
|
||||
# [*arch*]
|
||||
# java architecture type.
|
||||
#
|
||||
# [*package_name*]
|
||||
# Name of the java installation package to download from github.
|
||||
#
|
||||
# [*install_command*]
|
||||
# Installation command used to install java. Installation commands
|
||||
# differ by package_type. 'bin' types are installed via shell command. 'rpmbin'
|
||||
# types have the rpms extracted and then forcibly installed. 'rpm' types are
|
||||
# forcibly installed.
|
||||
#
|
||||
# [*spacer*]
|
||||
# Spacer to be used in github download url. In major version 8 this is a simple dash
|
||||
# in later versions they use a crazy plus sign, which needs to be used in urlencoded
|
||||
# format
|
||||
#
|
||||
# [*download_folder_prefix*]
|
||||
# Download folder name begins differently depending on the release. After major release
|
||||
# 8, they have given it a dash. Be aware that even if you want to have a JRE, the folder
|
||||
# still begins with "jdk"
|
||||
#
|
||||
# [*release_minor_url*]
|
||||
# filled depending on major release. Until major release 8 the minor part needs to be given
|
||||
# with a 'b' for build, in later versions it is a underscore or a plus sign, which needs
|
||||
# to be stripped for the download url and is replaced with the given spaces (see above)
|
||||
#
|
||||
# [*_package_type*]
|
||||
# Helper variable which gets filled depending on parameter package_type
|
||||
#
|
||||
# [*_basedir*]
|
||||
# Helper variable which gets filled depending on parameter basedir
|
||||
#
|
||||
# [*_version*]
|
||||
# Helper variable which gets filled depending on parameter version
|
||||
#
|
||||
# [*_version_int*]
|
||||
# Helper variable which gets the value of $_version converted to integer
|
||||
#
|
||||
# [*_append_jre*]
|
||||
# Helper variable which gets filled with the string "-jre" if jre was selected to build the correct install path
|
||||
#
|
||||
# [*_release_minor_package_name*]
|
||||
# Helper variable which gets filled with the right minor string depending on the major version
|
||||
# @param symlink_name
|
||||
# The name for the optional symlink in the installation directory.
|
||||
#
|
||||
define java::adopt (
|
||||
$ensure = 'present',
|
||||
@@ -123,6 +54,8 @@ define java::adopt (
|
||||
$basedir = undef,
|
||||
$manage_basedir = true,
|
||||
$package_type = undef,
|
||||
$manage_symlink = false,
|
||||
$symlink_name = undef,
|
||||
) {
|
||||
|
||||
# archive module is used to download the java package
|
||||
@@ -357,6 +290,14 @@ define java::adopt (
|
||||
require => $install_requires
|
||||
}
|
||||
|
||||
if ($manage_symlink and $symlink_name) {
|
||||
file { "${_basedir}/${symlink_name}":
|
||||
ensure => link,
|
||||
target => $creates_path,
|
||||
require => Exec["Install AdoptOpenJDK java ${java} ${_version} ${release_major} ${release_minor}"],
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
default : {
|
||||
fail ("unsupported platform ${$facts['kernel']}")
|
||||
|
||||
@@ -142,7 +142,7 @@ class java::params {
|
||||
},
|
||||
}
|
||||
}
|
||||
'10', '18.04', '18.10', '19.04', '19.10': {
|
||||
'10', '18.04', '18.10', '19.04', '19.10', '20.04': {
|
||||
$java = {
|
||||
'jdk' => {
|
||||
'package' => 'openjdk-11-jdk',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "puppetlabs-java",
|
||||
"version": "6.2.0",
|
||||
"version": "6.3.0",
|
||||
"author": "puppetlabs",
|
||||
"summary": "Installs the correct Java package on various platforms.",
|
||||
"license": "Apache-2.0",
|
||||
@@ -62,7 +62,8 @@
|
||||
"operatingsystemrelease": [
|
||||
"14.04",
|
||||
"16.04",
|
||||
"18.04"
|
||||
"18.04",
|
||||
"20.04"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -81,6 +82,6 @@
|
||||
}
|
||||
],
|
||||
"template-url": "https://github.com/puppetlabs/pdk-templates#master",
|
||||
"template-ref": "heads/master-0-g88c96ab",
|
||||
"pdk-version": "1.16.0"
|
||||
"template-ref": "heads/master-0-g88b05c7",
|
||||
"pdk-version": "1.17.0"
|
||||
}
|
||||
|
||||
@@ -1,22 +1,29 @@
|
||||
---
|
||||
default:
|
||||
provisioner: docker
|
||||
images: ['waffleimage/debian8']
|
||||
images: ['litmusimage/debian:8']
|
||||
vagrant:
|
||||
provisioner: vagrant
|
||||
images: ['centos/7', 'generic/ubuntu1804']
|
||||
travis_deb:
|
||||
provisioner: docker
|
||||
images: ['waffleimage/debian8', 'waffleimage/debian9', 'waffleimage/debian10']
|
||||
travis_ub:
|
||||
images: ['litmusimage/debian:8', 'litmusimage/debian:9', 'litmusimage/debian:10']
|
||||
travis_ub_5:
|
||||
provisioner: docker
|
||||
images: ['waffleimage/ubuntu14.04', 'waffleimage/ubuntu16.04', 'waffleimage/ubuntu18.04']
|
||||
images: ['litmusimage/ubuntu:14.04', 'litmusimage/ubuntu:16.04', 'litmusimage/ubuntu:18.04']
|
||||
travis_ub_6:
|
||||
provisioner: docker
|
||||
images: ['litmusimage/ubuntu:14.04', 'litmusimage/ubuntu:16.04', 'litmusimage/ubuntu:18.04', 'litmusimage/ubuntu:20.04']
|
||||
travis_el6:
|
||||
provisioner: docker
|
||||
images: ['waffleimage/centos6', 'waffleimage/oraclelinux6', 'waffleimage/scientificlinux6']
|
||||
images: ['litmusimage/centos:6', 'litmusimage/oraclelinux:6', 'litmusimage/scientificlinux:6']
|
||||
travis_el7:
|
||||
provisioner: docker
|
||||
images: ['waffleimage/centos7', 'waffleimage/oraclelinux7', 'waffleimage/scientificlinux7']
|
||||
release_checks:
|
||||
provisioner: vmpooler
|
||||
images: ['litmusimage/centos:7', 'litmusimage/oraclelinux:7', 'litmusimage/scientificlinux:7']
|
||||
release_checks_5:
|
||||
provisioner: abs
|
||||
images: ['redhat-6-x86_64', 'redhat-7-x86_64', 'redhat-8-x86_64', 'centos-6-x86_64', 'centos-7-x86_64', 'centos-8-x86_64', 'oracle-6-x86_64', 'oracle-7-x86_64', 'scientific-6-x86_64', 'scientific-7-x86_64', 'debian-8-x86_64', 'debian-9-x86_64', 'debian-10-x86_64', 'ubuntu-1404-x86_64', 'ubuntu-1604-x86_64', 'ubuntu-1804-x86_64', 'sles-11-x86_64', 'sles-12-x86_64', 'sles-15-x86_64']
|
||||
release_checks_6:
|
||||
provisioner: abs
|
||||
images: ['redhat-6-x86_64', 'redhat-7-x86_64', 'redhat-8-x86_64', 'centos-6-x86_64', 'centos-7-x86_64', 'centos-8-x86_64', 'oracle-6-x86_64', 'oracle-7-x86_64', 'scientific-6-x86_64', 'scientific-7-x86_64', 'debian-8-x86_64', 'debian-9-x86_64', 'debian-10-x86_64', 'ubuntu-1404-x86_64', 'ubuntu-1604-x86_64', 'ubuntu-1804-x86_64', 'ubuntu-2004-x86_64', 'sles-11-x86_64', 'sles-12-x86_64', 'sles-15-x86_64']
|
||||
|
||||
@@ -4,6 +4,29 @@ describe 'java::adopt', type: :define do
|
||||
context 'with CentOS 64-bit' do
|
||||
let(:facts) { { kernel: 'Linux', os: { family: 'RedHat', architecture: 'x86_64', name: 'CentOS', release: { full: '6.0' } } } }
|
||||
|
||||
context 'when manage_symlink is set to true' do
|
||||
let(:params) do
|
||||
{
|
||||
ensure: 'present',
|
||||
version: '11',
|
||||
java: 'jdk',
|
||||
basedir: '/usr/java',
|
||||
manage_symlink: true,
|
||||
symlink_name: 'java_home',
|
||||
}
|
||||
end
|
||||
let(:title) { 'jdk11_symlink' }
|
||||
|
||||
it { is_expected.to contain_file('/usr/java/java_home') }
|
||||
end
|
||||
|
||||
context 'when manage_symlink is not set' do
|
||||
let(:params) { { ensure: 'present', version: '11', java: 'jdk' } }
|
||||
let(:title) { 'jdk11_nosymlink' }
|
||||
|
||||
it { is_expected.not_to contain_file('/usr/java/java_home') }
|
||||
end
|
||||
|
||||
context 'when AdoptOpenJDK Java 8 JDK' do
|
||||
let(:params) { { ensure: 'present', version: '8', java: 'jdk' } }
|
||||
let(:title) { 'jdk8' }
|
||||
|
||||
@@ -55,6 +55,21 @@ describe 'java::download', type: :define do
|
||||
|
||||
it { is_expected.to contain_file('/usr/java/java_home') }
|
||||
end
|
||||
|
||||
context 'when manage_symlink is not set' do
|
||||
let(:params) do
|
||||
{
|
||||
ensure: 'present',
|
||||
version: '6',
|
||||
java_se: 'jdk',
|
||||
basedir: '/usr/java',
|
||||
url: url,
|
||||
}
|
||||
end
|
||||
let(:title) { 'jdk6_nosymlink' }
|
||||
|
||||
it { is_expected.not_to contain_file('/usr/java/java_home') }
|
||||
end
|
||||
end
|
||||
|
||||
context 'with Ubuntu 64-bit' do
|
||||
|
||||
@@ -42,6 +42,7 @@ RSpec.configure do |c|
|
||||
# set to strictest setting for testing
|
||||
# by default Puppet runs at warning level
|
||||
Puppet.settings[:strict] = :warning
|
||||
Puppet.settings[:strict_variables] = true
|
||||
end
|
||||
c.filter_run_excluding(bolt: true) unless ENV['GEM_BOLT']
|
||||
c.after(:suite) do
|
||||
|
||||
@@ -1,82 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'serverspec'
|
||||
require 'puppet_litmus'
|
||||
require 'spec_helper_acceptance_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_acceptance_local.rb'))
|
||||
include PuppetLitmus
|
||||
|
||||
if ENV['TARGET_HOST'].nil? || ENV['TARGET_HOST'] == 'localhost'
|
||||
puts 'Running tests against this machine !'
|
||||
if Gem.win_platform?
|
||||
set :backend, :cmd
|
||||
else
|
||||
set :backend, :exec
|
||||
end
|
||||
else
|
||||
# load inventory
|
||||
inventory_hash = inventory_hash_from_inventory_file
|
||||
node_config = config_from_node(inventory_hash, ENV['TARGET_HOST'])
|
||||
|
||||
if target_in_group(inventory_hash, ENV['TARGET_HOST'], 'docker_nodes')
|
||||
host = ENV['TARGET_HOST']
|
||||
set :backend, :docker
|
||||
set :docker_container, host
|
||||
elsif target_in_group(inventory_hash, ENV['TARGET_HOST'], 'ssh_nodes')
|
||||
set :backend, :ssh
|
||||
options = Net::SSH::Config.for(host)
|
||||
options[:user] = node_config.dig('ssh', 'user') unless node_config.dig('ssh', 'user').nil?
|
||||
options[:port] = node_config.dig('ssh', 'port') unless node_config.dig('ssh', 'port').nil?
|
||||
options[:keys] = node_config.dig('ssh', 'private-key') unless node_config.dig('ssh', 'private-key').nil?
|
||||
options[:password] = node_config.dig('ssh', 'password') unless node_config.dig('ssh', 'password').nil?
|
||||
# Support both net-ssh 4 and 5.
|
||||
# rubocop:disable Metrics/BlockNesting
|
||||
options[:verify_host_key] = if node_config.dig('ssh', 'host-key-check').nil?
|
||||
# Fall back to SSH behavior. This variable will only be set in net-ssh 5.3+.
|
||||
if @strict_host_key_checking.nil? || @strict_host_key_checking
|
||||
Net::SSH::Verifiers::Always.new
|
||||
else
|
||||
# SSH's behavior with StrictHostKeyChecking=no: adds new keys to known_hosts.
|
||||
# If known_hosts points to /dev/null, then equivalent to :never where it
|
||||
# accepts any key beacuse they're all new.
|
||||
Net::SSH::Verifiers::AcceptNewOrLocalTunnel.new
|
||||
end
|
||||
elsif node_config.dig('ssh', 'host-key-check')
|
||||
if defined?(Net::SSH::Verifiers::Always)
|
||||
Net::SSH::Verifiers::Always.new
|
||||
else
|
||||
Net::SSH::Verifiers::Secure.new
|
||||
end
|
||||
elsif defined?(Net::SSH::Verifiers::Never)
|
||||
Net::SSH::Verifiers::Never.new
|
||||
else
|
||||
Net::SSH::Verifiers::Null.new
|
||||
end
|
||||
# rubocop:enable Metrics/BlockNesting
|
||||
host = if ENV['TARGET_HOST'].include?(':')
|
||||
ENV['TARGET_HOST'].split(':').first
|
||||
else
|
||||
ENV['TARGET_HOST']
|
||||
end
|
||||
set :host, options[:host_name] || host
|
||||
set :ssh_options, options
|
||||
set :request_pty, true
|
||||
elsif target_in_group(inventory_hash, ENV['TARGET_HOST'], 'winrm_nodes')
|
||||
require 'winrm'
|
||||
|
||||
set :backend, :winrm
|
||||
set :os, family: 'windows'
|
||||
user = node_config.dig('winrm', 'user') unless node_config.dig('winrm', 'user').nil?
|
||||
pass = node_config.dig('winrm', 'password') unless node_config.dig('winrm', 'password').nil?
|
||||
endpoint = "http://#{ENV['TARGET_HOST']}:5985/wsman"
|
||||
|
||||
opts = {
|
||||
user: user,
|
||||
password: pass,
|
||||
endpoint: endpoint,
|
||||
operation_timeout: 300,
|
||||
}
|
||||
|
||||
winrm = WinRM::Connection.new opts
|
||||
Specinfra.configuration.winrm = winrm
|
||||
end
|
||||
end
|
||||
PuppetLitmus.configure!
|
||||
|
||||
@@ -63,6 +63,7 @@ describe 'java_version' do
|
||||
|
||||
it do
|
||||
allow(Facter::Util::Resolution).to receive(:exec) # Catch all other calls
|
||||
allow(Facter::Util::Resolution).to receive(:which).and_return(nil)
|
||||
expect(Facter.value(:java_version)).to be_nil
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user