Skip to content

Commit

Permalink
Merge pull request #672 from maestrodev/ubuntu-bad-version
Browse files Browse the repository at this point in the history
Apache version in Ubuntu 13.10 is 2.4
  • Loading branch information
igalic committed Mar 10, 2014
2 parents 996e597 + ac167f3 commit 463b3d8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
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
5 changes: 3 additions & 2 deletions spec/acceptance/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -688,10 +688,11 @@ class { 'apache': service_ensure => stopped, }
class { 'apache': }
host { 'test.server': ip => '127.0.0.1' }
apache::vhost { 'test.server':
docroot => '/tmp',
action => 'php-fastcgi',
docroot => '/tmp',
action => 'php-fastcgi',
}
EOS
pp = pp + "\nclass { 'apache::mod::actions': }" if fact('osfamily') == 'Debian'
apply_manifest(pp, :catch_failures => true)
end

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 463b3d8

Please sign in to comment.