Revision 07b9c7c9
Added by Alex Fisher over 5 years ago
spec/classes/puppet_agent_service_systemd_spec.rb | ||
---|---|---|
require 'spec_helper'
|
||
require 'deep_merge'
|
||
|
||
describe 'puppet::agent::service::systemd' do
|
||
on_os_under_test.each do |os, facts|
|
||
... | ... | |
end
|
||
|
||
let :facts do
|
||
facts.merge(ipaddress: '192.0.2.100')
|
||
facts.deep_merge(networking: { ip: '192.0.2.100' })
|
||
end
|
||
|
||
describe 'when runmode is not systemd' do
|
Also available in: Unified diff
Use facter 3 facts during tests
By default, rspec-puppet-facts uses the facterdb facts that match the
version of the facter gem installed. Starting with facter 3, facter
was no longer shipped as a gem (it was rewritten in C++).
This commit sets `facterversion` to `3.0.0` so that tests run with
more modern (structured) facts stubbed.
Puppet has been shipping facter 3 since puppet 4.2.0. This module
supports puppet >= 4.6.1, (and puppet 4 is EOL at the end of 2018).
puppet-extlib's `ip_to_cron` function (used in
puppet::agent::service::cron) has recently moved to using the
`networking` structured fact not available in facter 2.