diff --git a/spec/acceptance/install_spec.rb b/spec/acceptance/install_spec.rb index 8642499..e45ba6c 100644 --- a/spec/acceptance/install_spec.rb +++ b/spec/acceptance/install_spec.rb @@ -16,12 +16,16 @@ require 'spec_helper_acceptance' # C14681 # C14682 # C14684 -# C14690 +# C14687 # C14692 # C14696 # C14697 +# C14700 check on solaris 11 +# C14701 check on sles 11 # 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 "jre" do it 'should install jre' do @@ -31,7 +35,7 @@ describe "installing java", :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfa } EOS - apply_manifest(pp, :expect_changes => true) + apply_manifest(pp, :catch_failures => true) apply_manifest(pp, :catch_changes => true) end end @@ -41,7 +45,7 @@ describe "installing java", :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfa class { 'java': } EOS - apply_manifest(pp, :expect_changes => true) + apply_manifest(pp, :catch_failures => true) apply_manifest(pp, :catch_changes => true) end end @@ -69,7 +73,7 @@ describe 'sun', :if => (fact('operatingsystem') == 'Debian' and fact('operatings } EOS - apply_manifest(pp, :expect_changes => true) + apply_manifest(pp, :catch_failures => true) apply_manifest(pp, :catch_changes => true) end end @@ -81,7 +85,7 @@ describe 'sun', :if => (fact('operatingsystem') == 'Debian' and fact('operatings } EOS - apply_manifest(pp, :expect_changes => true) + apply_manifest(pp, :catch_failures => true) apply_manifest(pp, :catch_changes => true) end end @@ -173,4 +177,26 @@ describe 'failure cases' do apply_manifest(pp, :expect_failures => true) 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 diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 1a8a44b..463e795 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -17,7 +17,7 @@ unless ENV["RS_PROVISION"] == "no" or ENV["BEAKER_provision"] == "no" end hosts.each do |host| 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 on host, "mkdir -p #{host["distmoduledir"]}" on host, "puppet module install puppetlabs-stdlib", :acceptable_exit_codes => [0,1]