Skip to content

Commit

Permalink
Fix support for Fedora Rawhide
Browse files Browse the repository at this point in the history
  • Loading branch information
xbezdick committed Dec 8, 2014
1 parent fee6749 commit 4bb9169
Show file tree
Hide file tree
Showing 2 changed files with 37 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 @@ -12,7 +12,7 @@

case $::osfamily {
'RedHat': {
if ($::operatingsystem == 'Fedora' and $distrelease >= 18) or ($::operatingsystem != 'Fedora' and $distrelease >= 7) {
if ($::operatingsystem == 'Fedora' and versioncmp($distrelease, '18') >= 0) or ($::operatingsystem != 'Fedora' and $distrelease >= 7) {
$default = '2.4'
} else {
$default = '2.2'
Expand Down
36 changes: 36 additions & 0 deletions spec/classes/apache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,42 @@
it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^EnableSendfile Off\n} }
end
end
context "on Fedora" do
let :facts do
super().merge({
:operatingsystem => 'Fedora'
})
end

context "21" do
let :facts do
super().merge({
:lsbdistrelease => '21',
:operatingsystemrelease => '21'
})
end
it { is_expected.to contain_class('apache').with_apache_version('2.4') }
end
context "Rawhide" do
let :facts do
super().merge({
:lsbdistrelease => 'Rawhide',
:operatingsystemrelease => 'Rawhide'
})
end
it { is_expected.to contain_class('apache').with_apache_version('2.4') }
end
# kinda obsolete
context "17" do
let :facts do
super().merge({
:lsbdistrelease => '17',
:operatingsystemrelease => '17'
})
end
it { is_expected.to contain_class('apache').with_apache_version('2.2') }
end
end
end
context "on a FreeBSD OS" do
let :facts do
Expand Down

0 comments on commit 4bb9169

Please sign in to comment.