[#153] Remove trailing whitespace from spec.

This commit is contained in:
Dan Carley 2013-09-16 13:56:14 +01:00
parent dc88fe6ef6
commit e0926f370d

View file

@ -5,7 +5,7 @@ describe 'apt::unattended_upgrades', :type => :class do
it { should contain_package("unattended-upgrades") } it { should contain_package("unattended-upgrades") }
it { it {
should create_file("/etc/apt/apt.conf.d/50unattended-upgrades").with({ should create_file("/etc/apt/apt.conf.d/50unattended-upgrades").with({
"owner" => "root", "owner" => "root",
"group" => "root", "group" => "root",
@ -13,8 +13,8 @@ describe 'apt::unattended_upgrades', :type => :class do
"require" => "Package[unattended-upgrades]", "require" => "Package[unattended-upgrades]",
}) })
} }
it { it {
should create_file("/etc/apt/apt.conf.d/10periodic").with({ should create_file("/etc/apt/apt.conf.d/10periodic").with({
"owner" => "root", "owner" => "root",
"group" => "root", "group" => "root",
@ -36,7 +36,7 @@ describe 'apt::unattended_upgrades', :type => :class do
it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Allowed-Origins \{\n\t"ubuntu:precise-security";\n\};$/) } it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Allowed-Origins \{\n\t"ubuntu:precise-security";\n\};$/) }
end end
end end
describe "blacklist" do describe "blacklist" do
describe "with param defaults" do describe "with param defaults" do
let(:params) {{ }} let(:params) {{ }}
@ -50,56 +50,56 @@ describe 'apt::unattended_upgrades', :type => :class do
it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Package-Blacklist \{\n\t"libc6";\n\t"libc6-dev";\n\};$/) } it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Package-Blacklist \{\n\t"libc6";\n\t"libc6-dev";\n\};$/) }
end end
end end
describe "with update => 2" do describe "with update => 2" do
let :params do let :params do
{ :update => "2" } { :update => "2" }
end end
it { should contain_file(file_periodic).with_content(/^APT::Periodic::Update-Package-Lists "2";$/) } it { should contain_file(file_periodic).with_content(/^APT::Periodic::Update-Package-Lists "2";$/) }
end end
describe "with download => 2" do describe "with download => 2" do
let :params do let :params do
{ :download => "2" } { :download => "2" }
end end
it { should contain_file(file_periodic).with_content(/^APT::Periodic::Download-Upgradeable-Packages "2";$/) } it { should contain_file(file_periodic).with_content(/^APT::Periodic::Download-Upgradeable-Packages "2";$/) }
end end
describe "with upgrade => 2" do describe "with upgrade => 2" do
let :params do let :params do
{ :upgrade => "2" } { :upgrade => "2" }
end end
it { should contain_file(file_periodic).with_content(/^APT::Periodic::Unattended-Upgrade "2";$/) } it { should contain_file(file_periodic).with_content(/^APT::Periodic::Unattended-Upgrade "2";$/) }
end end
describe "with autoclean => 2" do describe "with autoclean => 2" do
let :params do let :params do
{ :autoclean => "2" } { :autoclean => "2" }
end end
it { should contain_file(file_periodic).with_content(/^APT::Periodic::AutocleanInterval "2";$/) } it { should contain_file(file_periodic).with_content(/^APT::Periodic::AutocleanInterval "2";$/) }
end end
describe "with auto_fix => false" do describe "with auto_fix => false" do
let :params do let :params do
{ :auto_fix => false } { :auto_fix => false }
end end
it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::AutoFixInterruptedDpkg "false";$/) } it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::AutoFixInterruptedDpkg "false";$/) }
end end
describe "with minimal_steps => true" do describe "with minimal_steps => true" do
let :params do let :params do
{ :minimal_steps => true } { :minimal_steps => true }
end end
it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::MinimalSteps "true";$/) } it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::MinimalSteps "true";$/) }
end end
describe "with install_on_shutdown => true" do describe "with install_on_shutdown => true" do
let :params do let :params do
{ :install_on_shutdown => true } { :install_on_shutdown => true }
end end
it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::InstallOnShutdown "true";$/) } it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::InstallOnShutdown "true";$/) }
end end
describe "mail_to" do describe "mail_to" do
describe "param defaults" do describe "param defaults" do
let(:params) {{ }} let(:params) {{ }}
@ -116,21 +116,21 @@ describe 'apt::unattended_upgrades', :type => :class do
it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::MailOnlyOnError "true";$/) } it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::MailOnlyOnError "true";$/) }
end end
end end
describe "with remove_unused => false" do describe "with remove_unused => false" do
let :params do let :params do
{ :remove_unused => false } { :remove_unused => false }
end end
it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Remove-Unused-Dependencies "false";$/) } it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Remove-Unused-Dependencies "false";$/) }
end end
describe "with auto_reboot => true" do describe "with auto_reboot => true" do
let :params do let :params do
{ :auto_reboot => true } { :auto_reboot => true }
end end
it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Automatic-Reboot "true";$/) } it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Automatic-Reboot "true";$/) }
end end
describe "dl_limit" do describe "dl_limit" do
describe "param defaults" do describe "param defaults" do
let(:params) {{ }} let(:params) {{ }}
@ -144,61 +144,61 @@ describe 'apt::unattended_upgrades', :type => :class do
it { should contain_file(file_unattended).with_content(/^Acquire::http::Dl-Limit "70";$/) } it { should contain_file(file_unattended).with_content(/^Acquire::http::Dl-Limit "70";$/) }
end end
end end
describe "with enable => 0" do describe "with enable => 0" do
let :params do let :params do
{ :enable => "0" } { :enable => "0" }
end end
it { should contain_file(file_periodic).with_content(/^APT::Periodic::Enable "0";$/) } it { should contain_file(file_periodic).with_content(/^APT::Periodic::Enable "0";$/) }
end end
describe "with backup_interval => 1" do describe "with backup_interval => 1" do
let :params do let :params do
{ :backup_interval => "1" } { :backup_interval => "1" }
end end
it { should contain_file(file_periodic).with_content(/^APT::Periodic::BackUpArchiveInterval "1";$/) } it { should contain_file(file_periodic).with_content(/^APT::Periodic::BackUpArchiveInterval "1";$/) }
end end
describe "with backup_level => 0" do describe "with backup_level => 0" do
let :params do let :params do
{ :backup_level => "0" } { :backup_level => "0" }
end end
it { should contain_file(file_periodic).with_content(/^APT::Periodic::BackUpLevel "0";$/) } it { should contain_file(file_periodic).with_content(/^APT::Periodic::BackUpLevel "0";$/) }
end end
describe "with max_age => 1" do describe "with max_age => 1" do
let :params do let :params do
{ :max_age => "1" } { :max_age => "1" }
end end
it { should contain_file(file_periodic).with_content(/^APT::Periodic::MaxAge "1";$/) } it { should contain_file(file_periodic).with_content(/^APT::Periodic::MaxAge "1";$/) }
end end
describe "with min_age => 1" do describe "with min_age => 1" do
let :params do let :params do
{ :min_age => "1" } { :min_age => "1" }
end end
it { should contain_file(file_periodic).with_content(/^APT::Periodic::MinAge "1";$/) } it { should contain_file(file_periodic).with_content(/^APT::Periodic::MinAge "1";$/) }
end end
describe "with max_size => 1" do describe "with max_size => 1" do
let :params do let :params do
{ :max_size => "1" } { :max_size => "1" }
end end
it { should contain_file(file_periodic).with_content(/^APT::Periodic::MaxSize "1";$/) } it { should contain_file(file_periodic).with_content(/^APT::Periodic::MaxSize "1";$/) }
end end
describe "with download_delta => 2" do describe "with download_delta => 2" do
let :params do let :params do
{ :download_delta => "2" } { :download_delta => "2" }
end end
it { should contain_file(file_periodic).with_content(/^APT::Periodic::Download-Upgradeable-Packages-Debdelta "2";$/) } it { should contain_file(file_periodic).with_content(/^APT::Periodic::Download-Upgradeable-Packages-Debdelta "2";$/) }
end end
describe "with verbose => 2" do describe "with verbose => 2" do
let :params do let :params do
{ :verbose => "2" } { :verbose => "2" }
end end
it { should contain_file(file_periodic).with_content(/^APT::Periodic::Verbose "2";$/) } it { should contain_file(file_periodic).with_content(/^APT::Periodic::Verbose "2";$/) }
end end
end end