summaryrefslogtreecommitdiff
path: root/files/puppet/modules/pixelated/spec/classes/apt_preferences_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'files/puppet/modules/pixelated/spec/classes/apt_preferences_spec.rb')
-rw-r--r--files/puppet/modules/pixelated/spec/classes/apt_preferences_spec.rb19
1 files changed, 12 insertions, 7 deletions
diff --git a/files/puppet/modules/pixelated/spec/classes/apt_preferences_spec.rb b/files/puppet/modules/pixelated/spec/classes/apt_preferences_spec.rb
index 778e739..8b071f1 100644
--- a/files/puppet/modules/pixelated/spec/classes/apt_preferences_spec.rb
+++ b/files/puppet/modules/pixelated/spec/classes/apt_preferences_spec.rb
@@ -12,15 +12,20 @@ describe 'pixelated::apt::preferences' do
let(:pre_condition) { [
"class apt {}",
"define apt::sources_list($content='deb url') {}",
- "define apt::preferences_snippet($release='stable',$priority='999',$pin='release o=Debian') {}",
+ "define apt::preferences_snippet($release='stable',$priority='999',$pin='release o=Debian',$package='*',$ensure='present') {}",
] }
-# %w( soledad-server soledad-client soledad-common leap-keymanager leap-auth).each do | package |
- #it { should contain_apt__preferences_snippet("#{package}").with_pin('release o=pixelated')}
- #end
+ describe 'pixelated packages' do
+ it { should contain_apt__preferences_snippet("pixelated").with_pin('origin "packages.pixelated-project.org"')}
+ it { should contain_apt__preferences_snippet("pixelated").with_priority('1000')}
+ end
+
+ %w( soledad-server soledad-client soledad-common leap-keymanager leap-auth).each do | file |
+ it { should contain_file("/etc/apt/preferences.d/#{file}").with_ensure('absent')}
+ end
- # %w( python-urllib3 python-requests python-six).each do | package |
- #it { should contain_apt__preferences_snippet("#{package}").with_release(/jessie/) }
- #end
+ %w( python-urllib3 python-requests python-six).each do | package |
+ it { should contain_apt__preferences_snippet("#{package}").with_release(/jessie/) }
+ end
end