From e22aa3a36a954f62b288e14582758fe8d6c7fb54 Mon Sep 17 00:00:00 2001 From: Lutz Behnke Date: Thu, 5 Mar 2015 11:15:15 +0100 Subject: [PATCH] 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 --- manifests/params.pp | 16 ++++++++++++++++ .../nodesets/ubuntu-server-1504-x64.yml | 11 +++++++++++ spec/classes/java_spec.rb | 12 ++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 spec/acceptance/nodesets/ubuntu-server-1504-x64.yml diff --git a/manifests/params.pp b/manifests/params.pp index f905bc9..c16e5cb 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -109,6 +109,22 @@ class java::params { }, } } + 'vivid': { + $java = { + 'jdk' => { + 'package' => 'openjdk-8-jdk', + 'alternative' => "java-1.8.0-openjdk-${::architecture}", + 'alternative_path' => "/usr/lib/jvm/java-1.8.0-openjdk-${::architecture}/bin/java", + 'java_home' => "/usr/lib/jvm/java-1.8.0-openjdk-${::architecture}/", + }, + 'jre' => { + 'package' => 'openjdk-8-jre-headless', + 'alternative' => "java-1.8.0-openjdk-${::architecture}", + 'alternative_path' => "/usr/lib/jvm/java-1.8.0-openjdk-${::architecture}/bin/java", + 'java_home' => "/usr/lib/jvm/java-1.8.0-openjdk-${::architecture}/", + } + } + } } } 'Solaris': { diff --git a/spec/acceptance/nodesets/ubuntu-server-1504-x64.yml b/spec/acceptance/nodesets/ubuntu-server-1504-x64.yml new file mode 100644 index 0000000..ee3f024 --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-server-1504-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + ubuntu-server-1504-x64: + roles: + - master + platform: ubuntu-15.04-amd64 + box : puppetlabs/ubuntu-15.04-64-nocm + box_url : https://vagrantcloud.com/puppetlabs/ubuntu-15.04-64-nocm + hypervisor : vagrant +CONFIG: + log_level : debug + type: git diff --git a/spec/classes/java_spec.rb b/spec/classes/java_spec.rb index 3716684..f4836e6 100644 --- a/spec/classes/java_spec.rb +++ b/spec/classes/java_spec.rb @@ -108,6 +108,18 @@ describe 'java', :type => :class do it { should contain_exec('update-java-alternatives').with_command('update-java-alternatives --set bananafish --jre') } end + context 'select jdk for Ubuntu Vivid (15.04)' do + let(:facts) { {:osfamily => 'Debian', :operatingsystem => 'Ubuntu', :lsbdistcodename => 'vivid', :operatingsystemrelease => '15.04', :architecture => 'amd64',} } + let(:params) { { 'distribution' => 'jdk' } } + it { should contain_package('java').with_name('openjdk-8-jdk') } + end + + context 'select jre for Ubuntu Vivid (15.04)' do + let(:facts) { {:osfamily => 'Debian', :operatingsystem => 'Ubuntu', :lsbdistcodename => 'vivid', :operatingsystemrelease => '15.04', :architecture => 'amd64',} } + let(:params) { { 'distribution' => 'jre' } } + it { should contain_package('java').with_name('openjdk-8-jre-headless') } + end + context 'select openjdk for Amazon Linux' do let(:facts) { {:osfamily => 'RedHat', :operatingsystem => 'Amazon', :operatingsystemrelease => '3.4.43-43.43.amzn1.x86_64'} } it { should contain_package('java').with_name('java-1.7.0-openjdk-devel') }