Add acceptance tests
This includes tests for installing openjdk jdk & jre on most PE supported platforms.
This commit is contained in:
134
spec/acceptance/install_spec.rb
Normal file
134
spec/acceptance/install_spec.rb
Normal file
@@ -0,0 +1,134 @@
|
||||
require 'spec_helper_acceptance'
|
||||
|
||||
#RedHat, CentOS, Scientific, Oracle prior to 5.0 : Sun Java JDK/JRE 1.6
|
||||
#RedHat, CentOS, Scientific, Oracle 5.0 < x < 6.3 : OpenJDK Java JDK/JRE 1.6
|
||||
#RedHat, CentOS, Scientific, Oracle after 6.3 : OpenJDK Java JDK/JRE 1.7
|
||||
#Debian 5/6 & Ubuntu 10.04/11.04 : OpenJDK Java JDK/JRE 1.6 or Sun Java JDK/JRE 1.6
|
||||
#Debian 7/Jesse & Ubuntu 12.04 - 14.04 : OpenJDK Java JDK/JRE 1.7 or Oracle Java JDK/JRE 1.6
|
||||
#Solaris (what versions?) : Java JDK/JRE 1.7
|
||||
#OpenSuSE : OpenJDK Java JDK/JRE 1.7
|
||||
#SLES : IBM Java JDK/JRE 1.6
|
||||
|
||||
# C14677
|
||||
# C14678
|
||||
# C14679
|
||||
# C14680
|
||||
# C14681
|
||||
# C14682
|
||||
# C14684
|
||||
# C14690
|
||||
# C14692
|
||||
# C14696
|
||||
# C14697
|
||||
# C14703
|
||||
# C14722
|
||||
describe "installing java", :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
||||
describe "jre" do
|
||||
#case "#{fact('osfamily')} #{fact('operatingsystemrelease')}"
|
||||
#when /RedHat 4/
|
||||
# # How does it work? yum is not present...
|
||||
#when /RedHat 5/
|
||||
# java_version = 'java version "1.6.0'
|
||||
#when /RedHat (6|7)/
|
||||
# java_version = 'java version "1.7.0'
|
||||
#when /Debian (5|6|10|11)/
|
||||
# java_version = 'java version "1.6.0'
|
||||
#when /Debian (7|jesse|12|14)6/
|
||||
# java_version = 'java version "1.7.0'
|
||||
#when /Solaris /
|
||||
# java_version =
|
||||
#when /Suse/
|
||||
# java_version =
|
||||
#end
|
||||
|
||||
it 'should install jre' do
|
||||
pp = <<-EOS
|
||||
class { 'java':
|
||||
distribution => 'jre',
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest(pp, :expect_changes => true)
|
||||
apply_manifest(pp, :catch_changes => true)
|
||||
end
|
||||
end
|
||||
describe "jdk" do
|
||||
it 'should install jdk' do
|
||||
pp = <<-EOS
|
||||
class { 'java': }
|
||||
EOS
|
||||
|
||||
apply_manifest(pp, :expect_changes => true)
|
||||
apply_manifest(pp, :catch_changes => true)
|
||||
end
|
||||
end
|
||||
end
|
||||
# C14686
|
||||
describe 'sun', :if => (fact('operatingsystem') == 'Debian' and fact('operatingsystemrelease').match(/(5|6)/)) do
|
||||
before :all do
|
||||
pp = <<-EOS
|
||||
file_line { 'non-free source':
|
||||
path => '/etc/apt/sources.list',
|
||||
match => "deb http://osmirror.delivery.puppetlabs.net/debian/ ${::lsbdistcodename} main",
|
||||
line => "deb http://osmirror.delivery.puppetlabs.net/debian/ ${::lsbdistcodename} main non-free",
|
||||
}
|
||||
EOS
|
||||
apply_manifest(pp)
|
||||
shell('apt-get update')
|
||||
shell('echo "sun-java6-jdk shared/accepted-sun-dlj-v1-1 select true" | debconf-set-selections')
|
||||
shell('echo "sun-java6-jre shared/accepted-sun-dlj-v1-1 select true" | debconf-set-selections')
|
||||
end
|
||||
describe 'jre' do
|
||||
it 'should install sun-jre' do
|
||||
pp = <<-EOS
|
||||
class { 'java':
|
||||
distribution => 'sun-jre',
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest(pp, :expect_changes => true)
|
||||
apply_manifest(pp, :catch_changes => true)
|
||||
end
|
||||
end
|
||||
describe 'jdk' do
|
||||
it 'should install sun-jdk' do
|
||||
pp = <<-EOS
|
||||
class { 'java':
|
||||
distribution => 'sun-jdk',
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest(pp, :expect_changes => true)
|
||||
apply_manifest(pp, :catch_changes => true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# C14704
|
||||
describe 'oracle', :if => (fact('operatingsystem') == 'Debian' and fact('operatingsystemrelease').match(/^7/)) do
|
||||
# not supported
|
||||
# The package is not available from any sources, but if a customer
|
||||
# custom-builds the package using java-package and adds it to a local
|
||||
# repository, that is the intention of this version ability
|
||||
# C14704
|
||||
describe 'jre' do
|
||||
it 'should install oracle-jre' do
|
||||
pp = <<-EOS
|
||||
class { 'java':
|
||||
distribution => 'oracle-jre',
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest(pp, :expect_failures => true)
|
||||
end
|
||||
end
|
||||
describe 'jdk' do
|
||||
it 'should install oracle-jdk' do
|
||||
pp = <<-EOS
|
||||
class { 'java': }
|
||||
EOS
|
||||
|
||||
apply_manifest(pp, :expect_failures => true)
|
||||
end
|
||||
end
|
||||
end
|
||||
15
spec/acceptance/nodesets/centos-5-vcloud.yml
Normal file
15
spec/acceptance/nodesets/centos-5-vcloud.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
HOSTS:
|
||||
'centos-5-vcloud':
|
||||
roles:
|
||||
- master
|
||||
platform: el-5-x86_64
|
||||
hypervisor: vcloud
|
||||
template: centos-5-x86_64
|
||||
CONFIG:
|
||||
type: foss
|
||||
ssh:
|
||||
keys: "~/.ssh/id_rsa-acceptance"
|
||||
datastore: instance0
|
||||
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
||||
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
||||
pooling_api: http://vcloud.delivery.puppetlabs.net/
|
||||
12
spec/acceptance/nodesets/centos-59-x64-pe.yml
Normal file
12
spec/acceptance/nodesets/centos-59-x64-pe.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
HOSTS:
|
||||
centos-59-x64:
|
||||
roles:
|
||||
- master
|
||||
- database
|
||||
- console
|
||||
platform: el-5-x86_64
|
||||
box : centos-59-x64-vbox4210-nocm
|
||||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
type: pe
|
||||
10
spec/acceptance/nodesets/centos-59-x64.yml
Normal file
10
spec/acceptance/nodesets/centos-59-x64.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
HOSTS:
|
||||
centos-59-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: el-5-x86_64
|
||||
box : centos-59-x64-vbox4210-nocm
|
||||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
type: git
|
||||
15
spec/acceptance/nodesets/centos-6-vcloud.yml
Normal file
15
spec/acceptance/nodesets/centos-6-vcloud.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
HOSTS:
|
||||
'centos-6-vcloud':
|
||||
roles:
|
||||
- master
|
||||
platform: el-6-x86_64
|
||||
hypervisor: vcloud
|
||||
template: centos-6-x86_64
|
||||
CONFIG:
|
||||
type: foss
|
||||
ssh:
|
||||
keys: "~/.ssh/id_rsa-acceptance"
|
||||
datastore: instance0
|
||||
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
||||
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
||||
pooling_api: http://vcloud.delivery.puppetlabs.net/
|
||||
10
spec/acceptance/nodesets/centos-64-x64-fusion.yml
Normal file
10
spec/acceptance/nodesets/centos-64-x64-fusion.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
HOSTS:
|
||||
centos-64-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: el-6-x86_64
|
||||
box : centos-64-x64-fusion503-nocm
|
||||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box
|
||||
hypervisor : fusion
|
||||
CONFIG:
|
||||
type: foss
|
||||
12
spec/acceptance/nodesets/centos-64-x64-pe.yml
Normal file
12
spec/acceptance/nodesets/centos-64-x64-pe.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
HOSTS:
|
||||
centos-64-x64:
|
||||
roles:
|
||||
- master
|
||||
- database
|
||||
- dashboard
|
||||
platform: el-6-x86_64
|
||||
box : centos-64-x64-vbox4210-nocm
|
||||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
type: pe
|
||||
10
spec/acceptance/nodesets/centos-64-x64.yml
Normal file
10
spec/acceptance/nodesets/centos-64-x64.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
HOSTS:
|
||||
centos-64-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: el-6-x86_64
|
||||
box : centos-64-x64-vbox4210-nocm
|
||||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
type: foss
|
||||
10
spec/acceptance/nodesets/centos-65-x64.yml
Normal file
10
spec/acceptance/nodesets/centos-65-x64.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
HOSTS:
|
||||
centos-65-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: el-6-x86_64
|
||||
box : centos-65-x64-vbox436-nocm
|
||||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
type: foss
|
||||
15
spec/acceptance/nodesets/centos-7-vcloud.yml
Normal file
15
spec/acceptance/nodesets/centos-7-vcloud.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
HOSTS:
|
||||
'centos-7-vcloud':
|
||||
roles:
|
||||
- master
|
||||
platform: el-7-x86_64
|
||||
hypervisor: vcloud
|
||||
template: centos-7-x86_64
|
||||
CONFIG:
|
||||
type: foss
|
||||
ssh:
|
||||
keys: "~/.ssh/id_rsa-acceptance"
|
||||
datastore: instance0
|
||||
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
||||
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
||||
pooling_api: http://vcloud.delivery.puppetlabs.net/
|
||||
15
spec/acceptance/nodesets/debian-6-vcloud.yml
Normal file
15
spec/acceptance/nodesets/debian-6-vcloud.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
HOSTS:
|
||||
'debian-6-amd64':
|
||||
roles:
|
||||
- master
|
||||
platform: debian-6-amd64
|
||||
hypervisor: vcloud
|
||||
template: debian-6-x86_64
|
||||
CONFIG:
|
||||
type: foss
|
||||
ssh:
|
||||
keys: "~/.ssh/id_rsa-acceptance"
|
||||
datastore: instance0
|
||||
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
||||
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
||||
pooling_api: http://vcloud.delivery.puppetlabs.net/
|
||||
10
spec/acceptance/nodesets/debian-607-x64.yml
Normal file
10
spec/acceptance/nodesets/debian-607-x64.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
HOSTS:
|
||||
debian-607-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: debian-6-amd64
|
||||
box : debian-607-x64-vbox4210-nocm
|
||||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
type: git
|
||||
15
spec/acceptance/nodesets/debian-7-vcloud.yml
Normal file
15
spec/acceptance/nodesets/debian-7-vcloud.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
HOSTS:
|
||||
'debian-7-amd64':
|
||||
roles:
|
||||
- master
|
||||
platform: debian-7-amd64
|
||||
hypervisor: vcloud
|
||||
template: debian-7-x86_64
|
||||
CONFIG:
|
||||
type: foss
|
||||
ssh:
|
||||
keys: "~/.ssh/id_rsa-acceptance"
|
||||
datastore: instance0
|
||||
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
||||
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
||||
pooling_api: http://vcloud.delivery.puppetlabs.net/
|
||||
10
spec/acceptance/nodesets/debian-70rc1-x64.yml
Normal file
10
spec/acceptance/nodesets/debian-70rc1-x64.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
HOSTS:
|
||||
debian-70rc1-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: debian-7-amd64
|
||||
box : debian-70rc1-x64-vbox4210-nocm
|
||||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
type: git
|
||||
10
spec/acceptance/nodesets/default.yml
Normal file
10
spec/acceptance/nodesets/default.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
HOSTS:
|
||||
centos-64-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: el-6-x86_64
|
||||
box : centos-64-x64-vbox4210-nocm
|
||||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
type: foss
|
||||
10
spec/acceptance/nodesets/fedora-18-x64.yml
Normal file
10
spec/acceptance/nodesets/fedora-18-x64.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
HOSTS:
|
||||
fedora-18-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: fedora-18-x86_64
|
||||
box : fedora-18-x64-vbox4210-nocm
|
||||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
type: git
|
||||
15
spec/acceptance/nodesets/redhat-7-vcloud.yml
Normal file
15
spec/acceptance/nodesets/redhat-7-vcloud.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
HOSTS:
|
||||
'redhat-7-vcloud':
|
||||
roles:
|
||||
- master
|
||||
platform: el-7-x86_64
|
||||
hypervisor: vcloud
|
||||
template: redhat-7-x86_64
|
||||
CONFIG:
|
||||
type: foss
|
||||
ssh:
|
||||
keys: "~/.ssh/id_rsa-acceptance"
|
||||
datastore: instance0
|
||||
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
||||
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
||||
pooling_api: http://vcloud.delivery.puppetlabs.net/
|
||||
16
spec/acceptance/nodesets/sles-11-vcloud.yml
Normal file
16
spec/acceptance/nodesets/sles-11-vcloud.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
HOSTS:
|
||||
'sles-11-vcloud':
|
||||
roles:
|
||||
- master
|
||||
platform: sles-11-x86_64
|
||||
hypervisor: vcloud
|
||||
template: sles-11-x86_64
|
||||
|
||||
CONFIG:
|
||||
type: foss
|
||||
ssh:
|
||||
keys: "~/.ssh/id_rsa-acceptance"
|
||||
datastore: instance0
|
||||
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
||||
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
||||
pooling_api: http://vcloud.delivery.puppetlabs.net/
|
||||
10
spec/acceptance/nodesets/sles-11sp1-x64.yml
Normal file
10
spec/acceptance/nodesets/sles-11sp1-x64.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
HOSTS:
|
||||
sles-11sp1-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: sles-11-x86_64
|
||||
box : sles-11sp1-x64-vbox4210-nocm
|
||||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
type: git
|
||||
15
spec/acceptance/nodesets/solaris-11-vcloud.yml
Normal file
15
spec/acceptance/nodesets/solaris-11-vcloud.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
HOSTS:
|
||||
'solaris-11-vcloud':
|
||||
roles:
|
||||
- master
|
||||
platform: solaris-11-i386
|
||||
hypervisor: vcloud
|
||||
template: solaris-11-x86_64
|
||||
CONFIG:
|
||||
type: foss
|
||||
ssh:
|
||||
keys: "~/.ssh/id_rsa-acceptance"
|
||||
datastore: instance0
|
||||
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
||||
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
||||
pooling_api: http://vcloud.delivery.puppetlabs.net/
|
||||
15
spec/acceptance/nodesets/ubuntu-1004-vcloud.yml
Normal file
15
spec/acceptance/nodesets/ubuntu-1004-vcloud.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
HOSTS:
|
||||
'ubuntu-1004-amd64':
|
||||
roles:
|
||||
- master
|
||||
platform: ubuntu-10.04-amd64
|
||||
hypervisor: vcloud
|
||||
template: ubuntu-1004-x86_64
|
||||
CONFIG:
|
||||
type: foss
|
||||
ssh:
|
||||
keys: "~/.ssh/id_rsa-acceptance"
|
||||
datastore: instance0
|
||||
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
||||
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
||||
pooling_api: http://vcloud.delivery.puppetlabs.net/
|
||||
15
spec/acceptance/nodesets/ubuntu-1404-vcloud.yml
Normal file
15
spec/acceptance/nodesets/ubuntu-1404-vcloud.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
HOSTS:
|
||||
'ubuntu-1404-amd64':
|
||||
roles:
|
||||
- master
|
||||
platform: ubuntu-14.04-amd64
|
||||
hypervisor: vcloud
|
||||
template: ubuntu-1404-x86_64
|
||||
CONFIG:
|
||||
type: foss
|
||||
ssh:
|
||||
keys: "~/.ssh/id_rsa-acceptance"
|
||||
datastore: instance0
|
||||
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
||||
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
||||
pooling_api: http://vcloud.delivery.puppetlabs.net/
|
||||
10
spec/acceptance/nodesets/ubuntu-server-10044-x64.yml
Normal file
10
spec/acceptance/nodesets/ubuntu-server-10044-x64.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
HOSTS:
|
||||
ubuntu-server-10044-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: ubuntu-10.04-amd64
|
||||
box : ubuntu-server-10044-x64-vbox4210-nocm
|
||||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
type: foss
|
||||
10
spec/acceptance/nodesets/ubuntu-server-12042-x64.yml
Normal file
10
spec/acceptance/nodesets/ubuntu-server-12042-x64.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
HOSTS:
|
||||
ubuntu-server-12042-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: ubuntu-12.04-amd64
|
||||
box : ubuntu-server-12042-x64-vbox4210-nocm
|
||||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
type: foss
|
||||
11
spec/acceptance/nodesets/ubuntu-server-1404-x64.yml
Normal file
11
spec/acceptance/nodesets/ubuntu-server-1404-x64.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
HOSTS:
|
||||
ubuntu-server-1404-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: ubuntu-14.04-amd64
|
||||
box : puppetlabs/ubuntu-14.04-64-nocm
|
||||
box_url : https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
log_level : debug
|
||||
type: git
|
||||
@@ -55,9 +55,9 @@ describe 'java', :type => :class do
|
||||
end
|
||||
|
||||
context 'select default for Debian Squeeze' do
|
||||
let(:facts) { {:osfamily => 'Debian', :operatingsystem => 'Debian', :lsbdistcodename => 'squeeze', :operatingsystemrelease => '6.0.5'} }
|
||||
let(:facts) { {:osfamily => 'Debian', :operatingsystem => 'Debian', :lsbdistcodename => 'squeeze', :operatingsystemrelease => '6.0.5', :architecture => 'amd64',} }
|
||||
it { should contain_package('java').with_name('openjdk-6-jdk') }
|
||||
it { should contain_exec('update-java-alternatives').with_command('update-java-alternatives --set java-6-openjdk --jre') }
|
||||
it { should contain_exec('update-java-alternatives').with_command('update-java-alternatives --set java-6-openjdk-amd64 --jre') }
|
||||
end
|
||||
|
||||
context 'select Oracle JRE for Debian Squeeze' do
|
||||
|
||||
41
spec/spec_helper_acceptance.rb
Normal file
41
spec/spec_helper_acceptance.rb
Normal file
@@ -0,0 +1,41 @@
|
||||
require 'beaker-rspec'
|
||||
|
||||
UNSUPPORTED_PLATFORMS = [ "Darwin", "windows" ]
|
||||
|
||||
unless ENV["RS_PROVISION"] == "no" or ENV["BEAKER_provision"] == "no"
|
||||
if hosts.first.is_pe?
|
||||
install_pe
|
||||
else
|
||||
install_puppet({ :version => "3.6.2",
|
||||
:facter_version => "2.1.0",
|
||||
:hiera_version => "1.3.4",
|
||||
:default_action => "gem_install" })
|
||||
hosts.each do |h|
|
||||
on h, "/bin/mkdir -p #{h["puppetpath"]}"
|
||||
on h, "/bin/echo '' > #{h["hieraconf"]}"
|
||||
end
|
||||
end
|
||||
hosts.each do |host|
|
||||
if host["platform"] =~ /solaris/
|
||||
on host, "echo 'export PATH=/opt/puppet/bin:${PATH}' >> ~/.bashrc"
|
||||
end
|
||||
on host, "mkdir -p #{host["distmoduledir"]}"
|
||||
on host, "puppet module install puppetlabs-stdlib", :acceptable_exit_codes => [0,1]
|
||||
# For test support
|
||||
on host, "puppet module install puppetlabs-apt", :acceptable_exit_codes => [0,1]
|
||||
end
|
||||
end
|
||||
|
||||
RSpec.configure do |c|
|
||||
# Project root
|
||||
proj_root = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
||||
|
||||
# Readable test descriptions
|
||||
c.formatter = :documentation
|
||||
|
||||
# Configure all nodes in nodeset
|
||||
c.before :suite do
|
||||
# Install module
|
||||
puppet_module_install(:source => proj_root, :module_name => "java")
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user