Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: theforeman/puppet-pulpcore
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fe0081e1f09e7ebb570fd700afe5b56355114c60
Choose a base ref
..
head repository: theforeman/puppet-pulpcore
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 832a3a29756abffeadc0856ca7a9cd1435e075a4
Choose a head ref
Showing with 12 additions and 0 deletions.
  1. +4 −0 manifests/socket_service.pp
  2. +8 −0 spec/classes/pulpcore_spec.rb
4 changes: 4 additions & 0 deletions manifests/socket_service.pp
Original file line number Diff line number Diff line change
@@ -52,6 +52,10 @@
}

if $active or $real_enable {
# Systemd needs both .socket and .service to be loaded when starting the
# service. The unit_file takes care of matching, this ensures the
# non-matching order.
File["/etc/systemd/system/${name}.socket"] -> Service["${name}.service"]
File["/etc/systemd/system/${name}.service"] -> Service["${name}.socket"]
}
}
8 changes: 8 additions & 0 deletions spec/classes/pulpcore_spec.rb
Original file line number Diff line number Diff line change
@@ -119,6 +119,14 @@

it 'configures services' do
is_expected.to contain_class('pulpcore::service')
is_expected.to contain_pulpcore__socket_service('pulpcore-api')
is_expected.to contain_systemd__unit_file('pulpcore-api.socket')
is_expected.to contain_systemd__unit_file('pulpcore-api.service')
is_expected.to contain_file('/etc/systemd/system/pulpcore-api.socket').that_comes_before('Service[pulpcore-api.service]')
is_expected.to contain_pulpcore__socket_service('pulpcore-content')
is_expected.to contain_systemd__unit_file('pulpcore-content.socket')
is_expected.to contain_systemd__unit_file('pulpcore-content.service')
is_expected.to contain_file('/etc/systemd/system/pulpcore-content.socket').that_comes_before('Service[pulpcore-content.service]')
is_expected.to contain_systemd__unit_file('pulpcore-resource-manager.service')
is_expected.to contain_systemd__unit_file('pulpcore-worker@.service')
is_expected.to contain_service("pulpcore-worker@1.service").with_ensure(true)