Add more tests and make solaris pass
This commit is contained in:
@@ -16,12 +16,16 @@ require 'spec_helper_acceptance'
|
|||||||
# C14681
|
# C14681
|
||||||
# C14682
|
# C14682
|
||||||
# C14684
|
# C14684
|
||||||
# C14690
|
# C14687
|
||||||
# C14692
|
# C14692
|
||||||
# C14696
|
# C14696
|
||||||
# C14697
|
# C14697
|
||||||
|
# C14700 check on solaris 11
|
||||||
|
# C14701 check on sles 11
|
||||||
# C14703
|
# C14703
|
||||||
# C14722
|
# C14723 Where is oracle linux 5?
|
||||||
|
# C14724 Where is oracle linux 5?
|
||||||
|
# C14771 Where is redhat 7? Centos 7?
|
||||||
describe "installing java", :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
describe "installing java", :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
||||||
describe "jre" do
|
describe "jre" do
|
||||||
it 'should install jre' do
|
it 'should install jre' do
|
||||||
@@ -31,7 +35,7 @@ describe "installing java", :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfa
|
|||||||
}
|
}
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
apply_manifest(pp, :expect_changes => true)
|
apply_manifest(pp, :catch_failures => true)
|
||||||
apply_manifest(pp, :catch_changes => true)
|
apply_manifest(pp, :catch_changes => true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -41,7 +45,7 @@ describe "installing java", :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfa
|
|||||||
class { 'java': }
|
class { 'java': }
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
apply_manifest(pp, :expect_changes => true)
|
apply_manifest(pp, :catch_failures => true)
|
||||||
apply_manifest(pp, :catch_changes => true)
|
apply_manifest(pp, :catch_changes => true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -69,7 +73,7 @@ describe 'sun', :if => (fact('operatingsystem') == 'Debian' and fact('operatings
|
|||||||
}
|
}
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
apply_manifest(pp, :expect_changes => true)
|
apply_manifest(pp, :catch_failures => true)
|
||||||
apply_manifest(pp, :catch_changes => true)
|
apply_manifest(pp, :catch_changes => true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -81,7 +85,7 @@ describe 'sun', :if => (fact('operatingsystem') == 'Debian' and fact('operatings
|
|||||||
}
|
}
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
apply_manifest(pp, :expect_changes => true)
|
apply_manifest(pp, :catch_failures => true)
|
||||||
apply_manifest(pp, :catch_changes => true)
|
apply_manifest(pp, :catch_changes => true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -173,4 +177,26 @@ describe 'failure cases' do
|
|||||||
|
|
||||||
apply_manifest(pp, :expect_failures => true)
|
apply_manifest(pp, :expect_failures => true)
|
||||||
end
|
end
|
||||||
|
# C14715
|
||||||
|
it 'should fail to install java with an incorrect package' do
|
||||||
|
pp = <<-EOS
|
||||||
|
class { 'java':
|
||||||
|
package => 'xyz',
|
||||||
|
}
|
||||||
|
EOS
|
||||||
|
|
||||||
|
apply_manifest(pp, :expect_failures => true)
|
||||||
|
end
|
||||||
|
# C14717
|
||||||
|
# C14719
|
||||||
|
it 'should work as normal when passed java_alternative and path' do
|
||||||
|
pp = <<-EOS
|
||||||
|
class { 'java':
|
||||||
|
java_alternative => 'whatever',
|
||||||
|
java_alternative_path => '/whatever',
|
||||||
|
}
|
||||||
|
EOS
|
||||||
|
|
||||||
|
apply_manifest(pp, :catch_failures => true)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ unless ENV["RS_PROVISION"] == "no" or ENV["BEAKER_provision"] == "no"
|
|||||||
end
|
end
|
||||||
hosts.each do |host|
|
hosts.each do |host|
|
||||||
if host["platform"] =~ /solaris/
|
if host["platform"] =~ /solaris/
|
||||||
on host, "echo 'export PATH=/opt/puppet/bin:${PATH}' >> ~/.bashrc"
|
on host, "echo 'export PATH=/opt/puppet/bin:/var/ruby/1.8/gem_home/bin:${PATH}' >> ~/.bashrc"
|
||||||
end
|
end
|
||||||
on host, "mkdir -p #{host["distmoduledir"]}"
|
on host, "mkdir -p #{host["distmoduledir"]}"
|
||||||
on host, "puppet module install puppetlabs-stdlib", :acceptable_exit_codes => [0,1]
|
on host, "puppet module install puppetlabs-stdlib", :acceptable_exit_codes => [0,1]
|
||||||
|
|||||||
Reference in New Issue
Block a user