2014-01-06 23:39:48 +01:00
|
|
|
require 'spec_helper_acceptance'
|
2013-10-02 18:42:56 +02:00
|
|
|
|
2014-02-24 22:52:13 +01:00
|
|
|
describe 'apt::builddep', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
2013-10-02 18:42:56 +02:00
|
|
|
|
|
|
|
context 'reset' do
|
|
|
|
it 'removes packages' do
|
2014-02-21 20:55:16 +01:00
|
|
|
shell('apt-get -y remove znc')
|
2013-10-02 18:42:56 +02:00
|
|
|
shell('apt-get -y remove g++')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'apt::builddep' do
|
|
|
|
it 'should work with no errors' do
|
|
|
|
pp = <<-EOS
|
2013-10-02 20:04:51 +02:00
|
|
|
include '::apt'
|
2014-02-21 20:55:16 +01:00
|
|
|
apt::builddep { 'znc': }
|
2013-10-02 18:42:56 +02:00
|
|
|
EOS
|
|
|
|
|
2014-01-06 23:39:48 +01:00
|
|
|
apply_manifest(pp, :catch_failures => true)
|
2013-10-02 18:42:56 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
describe 'should install g++ as a dependency' do
|
|
|
|
describe package('g++') do
|
|
|
|
it { should be_installed }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'reset' do
|
|
|
|
it 'removes packages' do
|
2014-02-21 20:55:16 +01:00
|
|
|
shell('apt-get -y remove znc')
|
2013-10-02 18:42:56 +02:00
|
|
|
shell('apt-get -y remove g++')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|