From e7dd16bb08c77927bcc7e1294886e5024d9f385d Mon Sep 17 00:00:00 2001 From: Chris Pick Date: Wed, 3 Jun 2015 22:42:22 -0400 Subject: Fix Ubuntu trusty spec typo --- spec/classes/unattended_upgrades_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec') diff --git a/spec/classes/unattended_upgrades_spec.rb b/spec/classes/unattended_upgrades_spec.rb index fa8d1b1..1367d8e 100644 --- a/spec/classes/unattended_upgrades_spec.rb +++ b/spec/classes/unattended_upgrades_spec.rb @@ -96,7 +96,7 @@ describe 'unattended_upgrades' do let(:facts) { { :osfamily => 'Debian', :lsbdistid => 'Ubuntu', - :lsbistcodename => 'truste', + :lsbistcodename => 'trusty', :lsbrelease => '14.04', } } it { -- cgit v1.2.3 From 0bd0127d015ad386e26cc1c0e60188244bdbb054 Mon Sep 17 00:00:00 2001 From: Chris Pick Date: Wed, 3 Jun 2015 23:02:01 -0400 Subject: 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. --- spec/classes/unattended_upgrades_spec.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'spec') 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 -- cgit v1.2.3