Révision aedd9325
set service provider to systemd in unit tests
spec/support/spec/mock.rb | ||
---|---|---|
1 |
# frozen_string_literal: true |
|
2 |
|
|
3 |
RSpec.configure do |c| |
|
4 |
c.before do |
|
5 |
# select the systemd service provider even when on docker |
|
6 |
# https://tickets.puppetlabs.com/browse/PUP-11167 |
|
7 |
allow(Puppet::FileSystem).to receive(:exist?).and_call_original |
|
8 |
allow(Puppet::FileSystem).to receive(:exist?).with('/proc/1/comm').and_return(true) |
|
9 |
allow(Puppet::FileSystem).to receive(:read).and_call_original |
|
10 |
allow(Puppet::FileSystem).to receive(:read).with('/proc/1/comm').and_return(['systemd']) |
|
11 |
end |
|
12 |
end |
Formats disponibles : Unified diff