Projet

Général

Profil

Révision aedd9325

IDaedd93257bed4d48cad0339dbec1ad8cf9584bf1
Parent dab19d29
Enfant 6097389c

Ajouté par Tim Meusel il y a 4 mois

set service provider to systemd in unit tests

Voir les différences:

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