summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRaoul Bhatia <raoul@bhatia.at>2015-09-09 22:52:04 +0200
committerRaoul Bhatia <raoul@bhatia.at>2015-09-09 23:06:05 +0200
commit0d2b73da1a528daed34b9bff1f120145da5799fd (patch)
treeb15d8ddef31d9283a0c81ff4e5ee60b80a38e36d /spec
parent84a7d6cdea460cb3da3c95adc8d8b9f2d421eeff (diff)
Enhance and bugfix tests for Ubuntu Vivid & Wily
Diffstat (limited to 'spec')
-rw-r--r--spec/classes/unattended_upgrades_spec.rb40
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/classes/unattended_upgrades_spec.rb b/spec/classes/unattended_upgrades_spec.rb
index d47ad06..72291d5 100644
--- a/spec/classes/unattended_upgrades_spec.rb
+++ b/spec/classes/unattended_upgrades_spec.rb
@@ -195,6 +195,46 @@ describe 'unattended_upgrades' do
)}
end
+ context 'with defaults on Ubuntu 15.04 Vivid Vervet' do
+ let(:facts) { {
+ :osfamily => 'Debian',
+ :lsbdistid => 'Ubuntu',
+ :lsbdistcodename => 'vivid',
+ :lsbrelease => '15.04',
+ } }
+ 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"\${distro_id}\:\${distro_codename}-security";\n
+ };/x
+ )}
+ end
+
+ context 'with defaults on Ubuntu 15.10 Wily Werewolf' do
+ let(:facts) { {
+ :osfamily => 'Debian',
+ :lsbdistid => 'Ubuntu',
+ :lsbdistcodename => 'wily',
+ :lsbrelease => '15.10',
+ } }
+ 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"\${distro_id}\:\${distro_codename}-security";\n
+ };/x
+ )}
+ end
+
context 'with defaults on Raspbian' do
let(:facts) { {
:osfamily => 'Debian',