Skip to content

Commit

Permalink
Apache version in Ubuntu 13.10 is 2.4
Browse files Browse the repository at this point in the history
Fix incorrect distrelease comparison
  • Loading branch information
Carlos Sanchez committed Mar 10, 2014
1 parent 72a8924 commit 391bd5b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/version.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
}
'Debian': {
if $::operatingsystem == 'Ubuntu' and $distrelease >= 13.10 {
if $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease >= 13.10 {
$default = 2.4
} else {
$default = 2.2
Expand Down
33 changes: 33 additions & 0 deletions spec/classes/apache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,39 @@
it { should contain_file("/etc/apache2/apache2.conf").with_content %r{^Group www-data\n} }
end
end

context "on Ubuntu" do
let :facts do
super().merge({
:operatingsystem => 'Ubuntu'
})
end

context "13.10" do
let :facts do
super().merge({
:operatingsystemrelease => '13.10'
})
end
it { should contain_class('apache').with_apache_version('2.4') }
end
context "12.04" do
let :facts do
super().merge({
:operatingsystemrelease => '12.04'
})
end
it { should contain_class('apache').with_apache_version('2.2') }
end
context "13.04" do
let :facts do
super().merge({
:operatingsystemrelease => '13.04'
})
end
it { should contain_class('apache').with_apache_version('2.2') }
end
end
end
context "on a RedHat 5 OS" do
let :facts do
Expand Down

0 comments on commit 391bd5b

Please sign in to comment.