Skip to content

Commit

Permalink
Merge pull request voxpupuli#944 from wyardley/fix_accept_failures
Browse files Browse the repository at this point in the history
add before => Package['nginx'] on repo absent ensures
  • Loading branch information
bastelfreak authored Oct 26, 2016
2 parents 9d3f205 + d7d50d4 commit d9d3c46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions manifests/package/redhat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

yumrepo { 'passenger':
ensure => absent,
before => Package['nginx'],
}

}
Expand All @@ -60,6 +61,7 @@

yumrepo { 'passenger':
ensure => absent,
before => Package['nginx'],
}

}
Expand All @@ -78,6 +80,7 @@

yumrepo { 'nginx-release':
ensure => absent,
before => Package['nginx'],
}

package { 'passenger':
Expand Down
6 changes: 6 additions & 0 deletions spec/classes/package_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
'ensure' => 'absent'
)
end
it { is_expected.to contain_yumrepo('nginx-release').that_comes_before('Package[nginx]') }
it { is_expected.to contain_yumrepo('passenger').that_comes_before('Package[nginx]') }
it { is_expected.to contain_anchor('nginx::package::begin').that_comes_before('Class[nginx::package::redhat]') }
it { is_expected.to contain_anchor('nginx::package::end').that_requires('Class[nginx::package::redhat]') }
end
Expand All @@ -36,6 +38,8 @@
'ensure' => 'absent'
)
end
it { is_expected.to contain_yumrepo('nginx-release').that_comes_before('Package[nginx]') }
it { is_expected.to contain_yumrepo('passenger').that_comes_before('Package[nginx]') }
end

context 'package_source => passenger' do
Expand All @@ -53,6 +57,8 @@
'ensure' => 'absent'
)
end
it { is_expected.to contain_yumrepo('passenger').that_comes_before('Package[nginx]') }
it { is_expected.to contain_yumrepo('nginx-release').that_comes_before('Package[nginx]') }
it { is_expected.to contain_package('passenger') }
end

Expand Down

0 comments on commit d9d3c46

Please sign in to comment.