From 886245f2cb7614a8c749d34e6f08ee17b92c970f Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Tue, 14 Apr 2015 17:25:40 +0200 Subject: Initial commit (this is not finished). --- spec/classes/unattended_upgrades_spec.rb | 32 ++++++++++++++++++++++++++++++++ spec/spec_helper.rb | 1 + 2 files changed, 33 insertions(+) create mode 100644 spec/classes/unattended_upgrades_spec.rb create mode 100644 spec/spec_helper.rb (limited to 'spec') diff --git a/spec/classes/unattended_upgrades_spec.rb b/spec/classes/unattended_upgrades_spec.rb new file mode 100644 index 0000000..b31f3d7 --- /dev/null +++ b/spec/classes/unattended_upgrades_spec.rb @@ -0,0 +1,32 @@ +require 'spec_helper' + +describe 'unattended_upgrades' do + let(:file_unattended) { '/etc/apt/apt.conf.d/50unattended-upgrades' } + let(:file_periodic) { '/etc/apt/apt.conf.d/10periodic' } + let(:facts) { { + :osfamily => 'Debian', + :lsbdistid => 'Debian', + :lsbistcodename => 'wheezy', + :lsbrelease => '7.0.3', + } } + + it { should contain_package("unattended-upgrades") } + + it { + should create_file(file_unattended).with({ + "owner" => "root", + "group" => "root", + "mode" => "0644", + "require" => "Package[unattended-upgrades]", + }) + } + + it { + should create_file(file_periodic).with({ + "owner" => "root", + "group" => "root", + "mode" => "0644", + "require" => "Package[unattended-upgrades]", + }) + } +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..2c6f566 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' -- cgit v1.2.3