Created
March 3, 2016 10:50
-
-
Save JayH5/d85033f864e20ede0882 to your computer and use it in GitHub Desktop.
Test for Puppet version-specific behaviour.
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
context 'Mesos package --no-install-recommends' do | |
let(:params) do | |
{ | |
:controller_addrs => ['192.168.0.2'], | |
:advertise_addr => '192.168.0.2', | |
} | |
end | |
if Gem::Specification.find_by_name('puppet').version >= | |
Gem::Version.new('3.6.0') | |
it do | |
is_expected.to contain_package('mesos') | |
.with_install_options('--no-install-recommends') | |
end | |
it do | |
is_expected.not_to contain_service('zookeeper') | |
end | |
else | |
it do | |
is_expected.to contain_package('mesos') | |
.without_install_options('--no-install-recommends') | |
end | |
it do | |
is_expected.to contain_service('zookeeper') | |
.with_ensure('stopped') | |
.with_enable(false) | |
.that_requires('Package[mesos]') | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment