summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/classes/unattended_upgrades_spec.rb40
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/classes/unattended_upgrades_spec.rb b/spec/classes/unattended_upgrades_spec.rb
index d47ad06..72291d5 100644
--- a/spec/classes/unattended_upgrades_spec.rb
+++ b/spec/classes/unattended_upgrades_spec.rb
@@ -195,6 +195,46 @@ describe 'unattended_upgrades' do
)}
end
+ context 'with defaults on Ubuntu 15.04 Vivid Vervet' do
+ let(:facts) { {
+ :osfamily => 'Debian',
+ :lsbdistid => 'Ubuntu',
+ :lsbdistcodename => 'vivid',
+ :lsbrelease => '15.04',
+ } }
+ it {
+ should create_file(file_unattended).with({
+ 'owner' => 'root',
+ 'group' => 'root',
+ 'mode' => '0644',
+ }).with_content(
+ # This is the only section that's different for Ubuntu compared to Debian
+ /\Unattended-Upgrade::Allowed-Origins\ {\n
+ \t"\${distro_id}\:\${distro_codename}-security";\n
+ };/x
+ )}
+ end
+
+ context 'with defaults on Ubuntu 15.10 Wily Werewolf' do
+ let(:facts) { {
+ :osfamily => 'Debian',
+ :lsbdistid => 'Ubuntu',
+ :lsbdistcodename => 'wily',
+ :lsbrelease => '15.10',
+ } }
+ it {
+ should create_file(file_unattended).with({
+ 'owner' => 'root',
+ 'group' => 'root',
+ 'mode' => '0644',
+ }).with_content(
+ # This is the only section that's different for Ubuntu compared to Debian
+ /\Unattended-Upgrade::Allowed-Origins\ {\n
+ \t"\${distro_id}\:\${distro_codename}-security";\n
+ };/x
+ )}
+ end
+
context 'with defaults on Raspbian' do
let(:facts) { {
:osfamily => 'Debian',