Skip to content

Commit

Permalink
Merge pull request #1348 from bmjen/modules-3018
Browse files Browse the repository at this point in the history
(MODULES-3018) Fixes apache to work correctly with concat.
  • Loading branch information
hunner committed Jan 29, 2016
2 parents 4d0c2b9 + e96a933 commit 07cc69b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
4 changes: 1 addition & 3 deletions .fixtures.yml
@@ -1,9 +1,7 @@
fixtures:
repositories:
stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
concat:
repo: "git://github.com/puppetlabs/puppetlabs-concat.git"
branch: "1.2.x"
concat: "git://github.com/puppetlabs/puppetlabs-concat.git"
portage: "git://github.com/gentoo/puppet-portage.git"
symlinks:
apache: "#{source_dir}"
2 changes: 1 addition & 1 deletion manifests/init.pp
Expand Up @@ -345,7 +345,7 @@
ensure => file,
content => template($conf_template),
notify => Class['Apache::Service'],
require => [Package['httpd'], File[$ports_file]],
require => [Package['httpd'], Concat[$ports_file]],
}

# preserve back-wards compatibility to the times when default_mods was
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Expand Up @@ -9,7 +9,7 @@
"issues_url": "https://tickets.puppetlabs.com/browse/MODULES",
"dependencies": [
{"name":"puppetlabs/stdlib","version_requirement":">= 2.4.0 < 5.0.0"},
{"name":"puppetlabs/concat","version_requirement":">= 1.1.1 < 2.0.0"}
{"name":"puppetlabs/concat","version_requirement":">= 1.1.1 < 3.0.0"}
],
"operatingsystem_support": [
{
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/custom_config_spec.rb
Expand Up @@ -82,7 +82,7 @@ class { 'apache': }
# Try to wedge the apache::custom_config call between when httpd.conf is written and
# ports.conf is written. This should trigger a dependency cycle
File["#{$conf_file}"] -> Apache::Custom_config['ordering_test'] -> File["#{$ports_file}"]
File["#{$conf_file}"] -> Apache::Custom_config['ordering_test'] -> Concat["#{$ports_file}"]
EOS
expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Found 1 dependency cycle/i)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/apache_spec.rb
Expand Up @@ -504,7 +504,7 @@
it { is_expected.to contain_file("/opt/rh/root/etc/httpd/conf/httpd.conf").with(
'ensure' => 'file',
'notify' => 'Class[Apache::Service]',
'require' => ['Package[httpd]', 'File[/etc/httpd/conf/ports.conf]'],
'require' => ['Package[httpd]', 'Concat[/etc/httpd/conf/ports.conf]'],
) }
end

Expand Down
10 changes: 5 additions & 5 deletions spec/defines/vhost_spec.rb
Expand Up @@ -50,7 +50,7 @@
let :facts do default_facts end
it { is_expected.to contain_class("apache") }
it { is_expected.to contain_class("apache::params") }
it { is_expected.to contain_file("25-rspec.example.com.conf").with(
it { is_expected.to contain_concat("25-rspec.example.com.conf").with(
:ensure => 'present',
:path => '/etc/apache2/sites-available/25-rspec.example.com.conf'
) }
Expand All @@ -77,7 +77,7 @@
let :facts do default_facts end
it { is_expected.to contain_class("apache") }
it { is_expected.to contain_class("apache::params") }
it { is_expected.to contain_file("25-rspec.example.com.conf").with(
it { is_expected.to contain_concat("25-rspec.example.com.conf").with(
:ensure => 'present',
:path => '/usr/local/etc/apache24/Vhosts/25-rspec.example.com.conf'
) }
Expand All @@ -99,7 +99,7 @@
let :facts do default_facts end
it { is_expected.to contain_class("apache") }
it { is_expected.to contain_class("apache::params") }
it { is_expected.to contain_file("25-rspec.example.com.conf").with(
it { is_expected.to contain_concat("25-rspec.example.com.conf").with(
:ensure => 'present',
:path => '/etc/apache2/vhosts.d/25-rspec.example.com.conf'
) }
Expand Down Expand Up @@ -1108,7 +1108,7 @@
end

it { is_expected.to compile }
it { is_expected.to contain_file('25-rspec.example.com.conf') }
it { is_expected.to contain_concat('25-rspec.example.com.conf') }
it { is_expected.to contain_concat__fragment('rspec.example.com-directories') }
it { is_expected.to contain_concat__fragment('rspec.example.com-directories').with(
:content => /^\s+Require all granted$/ ) }
Expand Down Expand Up @@ -1141,7 +1141,7 @@
end

it { is_expected.to compile }
it { is_expected.to contain_file('25-rspec.example.com.conf') }
it { is_expected.to contain_concat('25-rspec.example.com.conf') }
it { is_expected.to contain_concat__fragment('rspec.example.com-directories') }
it { is_expected.to_not contain_concat__fragment('rspec.example.com-directories').with(
:content => /^\s+Require all granted$/ )
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper_acceptance.rb
Expand Up @@ -43,7 +43,7 @@
copy_module_to(host, :source => proj_root, :module_name => 'apache')

on host, puppet('module','install','puppetlabs-stdlib')
on host, puppet('module','install','puppetlabs-concat', '--version 1.1.1', '--force')
on host, puppet('module','install','puppetlabs-concat')

# Required for mod_passenger tests.
if fact('osfamily') == 'RedHat'
Expand All @@ -59,7 +59,7 @@ class { 'epel': }

# Required for manifest to make mod_pagespeed repository available
if fact('osfamily') == 'Debian'
on host, puppet('module','install','puppetlabs-apt', '--version 1.8.0', '--force')
on host, puppet('module','install','puppetlabs-apt')
end

# Make sure selinux is disabled so the tests work.
Expand Down

0 comments on commit 07cc69b

Please sign in to comment.