forked from voxpupuli/puppet-cassandra
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring of acceptance tests as part of voxpupuli#351.
- Loading branch information
Showing
25 changed files
with
724 additions
and
940 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,13 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'Bootstrap' do | ||
bootstrap_pp = <<-EOS | ||
case downcase($::operatingsystem) { | ||
'centos': { | ||
if $::operatingsystemmajrelease == 6 { | ||
exec { '/bin/cp /opt/rh/ruby200/enable /etc/profile.d/ruby.sh': } -> | ||
exec { '/bin/rm /usr/bin/ruby /usr/bin/gem': } -> | ||
exec { '/usr/sbin/alternatives --install /usr/bin/ruby ruby /opt/rh/ruby200/root/usr/bin/ruby 1000': } -> | ||
exec { '/usr/sbin/alternatives --install /usr/bin/gem gem /opt/rh/ruby200/root/usr/bin/gem 1000': } | ||
} | ||
} | ||
'ubuntu': { | ||
if $::operatingsystemmajrelease == 12.04 { | ||
package {'python-software-properties':} -> | ||
exec {'/usr/bin/apt-add-repository ppa:brightbox/ruby-ng':} -> | ||
exec {'/usr/bin/apt-get update': } -> | ||
package {'ruby2.0': } -> | ||
exec { '/bin/rm /usr/bin/ruby': } -> | ||
exec { '/usr/sbin/update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby2.0 1000': } | ||
} | ||
} | ||
} | ||
EOS | ||
osfamily = fact('osfamily') | ||
roles = hosts[0]['roles'] | ||
t = TestManifests.new(roles, 0) | ||
bootstrap_pp = t.bootstrap_pp() | ||
|
||
describe '########### Node specific manifest.' do | ||
it 'should work with no errors' do | ||
apply_manifest(bootstrap_pp, catch_failures: true) | ||
shell('[ -d /opt/rh/ruby200 ] && /usr/bin/gem install puppet -v 3.8.7 --no-rdoc --no-ri; true') | ||
end | ||
describe 'Test Entry Criteria' do | ||
it "Should work with no errors (#{osfamily})" do | ||
apply_manifest(bootstrap_pp, catch_failures: true) | ||
shell('[ -d /opt/rh/ruby200 ] && /usr/bin/gem install puppet -v 3.8.7 --no-rdoc --no-ri; true') | ||
end | ||
end |
Oops, something went wrong.