From 2835cfbc652e37f8daccc36282cfbd5f34cad918 Mon Sep 17 00:00:00 2001 From: Raoul Bhatia Date: Sat, 28 May 2016 16:41:01 +0200 Subject: Ubuntu: Add 16.04 Xenial Xerus and 16.10 Yakkety Yak. --- spec/classes/unattended_upgrades_spec.rb | 48 ++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'spec') diff --git a/spec/classes/unattended_upgrades_spec.rb b/spec/classes/unattended_upgrades_spec.rb index c3b9673..ecbce37 100644 --- a/spec/classes/unattended_upgrades_spec.rb +++ b/spec/classes/unattended_upgrades_spec.rb @@ -300,6 +300,54 @@ describe 'unattended_upgrades' do end end + context 'with defaults on Ubuntu 16.04 Xenial Xerus' do + let(:facts) do + { + osfamily: 'Debian', + lsbdistid: 'Ubuntu', + lsbdistcodename: 'xenial', + lsbrelease: '16.04', + lsbdistrelease: '16.04' + } + end + it do + 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 + end + + context 'with defaults on Ubuntu 16.10 Yakkety Yak' do + let(:facts) do + { + osfamily: 'Debian', + lsbdistid: 'Ubuntu', + lsbdistcodename: 'yakkety', + lsbrelease: '16.10', + lsbdistrelease: '16.10' + } + end + it do + 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 + end + context 'with defaults on Raspbian' do let(:facts) do { -- cgit v1.2.3