Fix apt::dep spec tests.
Some of the existing tests were not verifying anything useful. This update replace them with more meaningful tests.
This commit is contained in:
parent
e3784987fc
commit
2ce47f0652
1 changed files with 4 additions and 11 deletions
|
@ -3,22 +3,15 @@ describe 'apt::builddep', :type => :define do
|
||||||
|
|
||||||
let(:title) { 'my_package' }
|
let(:title) { 'my_package' }
|
||||||
|
|
||||||
describe "should succeed with a Class['apt']" do
|
describe "should require apt-get update" do
|
||||||
let(:pre_condition) { 'class {"apt": } ' }
|
|
||||||
|
|
||||||
it { should contain_exec("apt_update").with({
|
it { should contain_exec("apt_update").with({
|
||||||
'command' => "/usr/bin/apt-get update",
|
'command' => "/usr/bin/apt-get update",
|
||||||
'refreshonly' => true
|
'refreshonly' => true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
end
|
it { should contain_anchor("apt::builddep::my_package").with({
|
||||||
|
'require' => 'Class[Apt::Update]',
|
||||||
describe "should fail without Class['apt']" do
|
})
|
||||||
it { expect {should contain_exec("apt-update-#{title}").with({
|
|
||||||
'command' => "/usr/bin/apt-get update",
|
|
||||||
'refreshonly' => true
|
|
||||||
}).to raise_error(Puppet::Error)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue