diff options
author | Raoul Bhatia <raoul@bhatia.at> | 2016-05-28 16:41:01 +0200 |
---|---|---|
committer | Raoul Bhatia <raoul@bhatia.at> | 2016-09-12 13:39:23 +0200 |
commit | 2835cfbc652e37f8daccc36282cfbd5f34cad918 (patch) | |
tree | 636e353cee019c738aa441035f131dca648f4953 /spec | |
parent | d256c8027c2d34fc8c5c6e0c64be5ff3b5aac8c5 (diff) |
Ubuntu: Add 16.04 Xenial Xerus and 16.10 Yakkety Yak.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/classes/unattended_upgrades_spec.rb | 48 |
1 files changed, 48 insertions, 0 deletions
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 { |