summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorChris Pick <chris@chrispick.com>2015-06-03 23:02:01 -0400
committerChris Pick <chris@chrispick.com>2015-06-03 23:15:07 -0400
commit0bd0127d015ad386e26cc1c0e60188244bdbb054 (patch)
tree42737f13a2811e3a4d57c0e907a6493e81f9fec5 /spec
parente7dd16bb08c77927bcc7e1294886e5024d9f385d (diff)
Add test demonstrating bad Allowed-Origins for Ubuntu
There is a typo in the default origins parameter for Ubuntu (the leading dollar sign and brace for the 'distro_codename' fields are transposed). This causes all unattended-upgrades to be disabled on Ubuntu machines by default.
Diffstat (limited to 'spec')
-rw-r--r--spec/classes/unattended_upgrades_spec.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/classes/unattended_upgrades_spec.rb b/spec/classes/unattended_upgrades_spec.rb
index 1367d8e..56f7d28 100644
--- a/spec/classes/unattended_upgrades_spec.rb
+++ b/spec/classes/unattended_upgrades_spec.rb
@@ -105,8 +105,11 @@ describe 'unattended_upgrades' do
'group' => 'root',
'mode' => '0644',
}).with_content(
- # This is the only line that's different for Ubuntu compared to Debian
- /Unattended-Upgrade::Allowed-Origins {/
+ # 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
+ \t"\${distro_id}\ \${distro_codename}-updates";\n
+ };/x
)}
end