summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRaoul Bhatia <raoul@bhatia.at>2016-05-28 16:09:03 +0200
committerRaoul Bhatia <raoul@bhatia.at>2016-05-29 10:18:10 +0200
commitd7ead6c0c95f20fc48446c3cfdb659f555a9987a (patch)
tree0ceb7a9c4298d45327fb5878e6b580e2a1dc9b56 /spec
parente3866999b958c91095c604b2c92f0951e6a03306 (diff)
LinuxMint: Add support for Linux Mint
Diffstat (limited to 'spec')
-rw-r--r--spec/classes/unattended_upgrades_spec.rb66
1 files changed, 66 insertions, 0 deletions
diff --git a/spec/classes/unattended_upgrades_spec.rb b/spec/classes/unattended_upgrades_spec.rb
index fea0ec0..f6e74af 100644
--- a/spec/classes/unattended_upgrades_spec.rb
+++ b/spec/classes/unattended_upgrades_spec.rb
@@ -293,6 +293,72 @@ describe 'unattended_upgrades' do
}
end
+ context 'with defaults on Linux Mint 13 Maya' do
+ let(:facts) { {
+ osfamily: 'Debian',
+ lsbdistid: 'LinuxMint',
+ lsbdistcodename: 'maya',
+ lsbdistrelease: '13',
+ lsbmajdistrelease: '13',
+ } }
+ 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"Ubuntu\:precise-security";\n
+ };/x
+ )
+ }
+ end
+
+ context 'with defaults on Linux Mint 17.3 Rosa' do
+ let(:facts) { {
+ osfamily: 'Debian',
+ lsbdistid: 'LinuxMint',
+ lsbdistcodename: 'rosa',
+ lsbdistrelease: '17.3',
+ lsbmajdistrelease: '17',
+ } }
+ 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"Ubuntu\:trusty-security";\n
+ };/x
+ )
+ }
+ end
+
+ context 'with defaults on Linux Mint 18 Sarah' do
+ let(:facts) { {
+ osfamily: 'Debian',
+ lsbdistid: 'LinuxMint',
+ lsbdistcodename: 'sarah',
+ lsbdistrelease: '18',
+ lsbmajdistrelease: '18',
+ } }
+ 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"Ubuntu\:xenial-security";\n
+ };/x
+ )
+ }
+ end
+
context 'set all the things' do
let :params do
{