|
1 |
| -require 'puppetlabs_spec_helper/module_spec_helper' |
2 |
| -require 'rspec-puppet-facts' |
3 |
| -include RspecPuppetFacts |
4 |
| - |
5 | 1 | location = File.expand_path('/dev/null')
|
6 | 2 |
|
7 |
| -RSpec.configure do |c| |
8 |
| - c.default_facts = { |
9 |
| - :aio_agent_version => '5.5.10', |
10 |
| - :puppetversion => '5.5.10', |
11 |
| - :lsbdistrelease => nil, |
12 |
| - :is_pe => false, |
13 |
| - :platform_tag => nil, |
14 |
| - :operatingsystem => nil, |
15 |
| - :operatingsystemmajrelease => nil, |
16 |
| - :kernelmajversion => nil, |
17 |
| - :macosx_productname => nil, |
18 |
| - :maxosx_productversion_major => nil, |
19 |
| - :rubyplatform => nil, |
20 |
| - :puppet_master_server => nil, |
21 |
| - :puppet_client_datadir => nil, |
22 |
| - :path => nil, |
23 |
| - :puppet_agent_appdata => nil, |
24 |
| - :system32 => nil, |
25 |
| - :fips_enabled => false, |
| 3 | +@default_module_facts = { |
| 4 | + :aio_agent_version => '5.5.10', |
| 5 | + :puppetversion => '5.5.10', |
| 6 | + :lsbdistrelease => nil, |
| 7 | + :is_pe => false, |
| 8 | + :platform_tag => nil, |
| 9 | + :operatingsystem => nil, |
| 10 | + :operatingsystemmajrelease => nil, |
| 11 | + :kernelmajversion => nil, |
| 12 | + :macosx_productname => nil, |
| 13 | + :maxosx_productversion_major => nil, |
| 14 | + :rubyplatform => nil, |
| 15 | + :puppet_master_server => nil, |
| 16 | + :puppet_client_datadir => nil, |
| 17 | + :path => nil, |
| 18 | + :puppet_agent_appdata => nil, |
| 19 | + :system32 => nil, |
| 20 | + :fips_enabled => false, |
26 | 21 |
|
27 |
| - :puppet_ssldir => "#{location}/ssl", |
28 |
| - :puppet_config => "#{location}/puppet.conf", |
29 |
| - :puppet_sslpaths => { |
30 |
| - 'privatedir' => { |
31 |
| - 'path' => "#{location}/ssl/private", |
32 |
| - 'path_exists' => true, |
33 |
| - }, |
34 |
| - 'privatekeydir' => { |
35 |
| - 'path' => "#{location}/ssl/private_keys", |
36 |
| - 'path_exists' => true, |
37 |
| - }, |
38 |
| - 'publickeydir' => { |
39 |
| - 'path' => "#{location}/ssl/public_keys", |
40 |
| - 'path_exists' => true, |
41 |
| - }, |
42 |
| - 'certdir' => { |
43 |
| - 'path' => "#{location}/ssl/certs", |
44 |
| - 'path_exists' => true, |
45 |
| - }, |
46 |
| - 'requestdir' => { |
47 |
| - 'path' => "#{location}/ssl/certificate_requests", |
48 |
| - 'path_exists' => true, |
49 |
| - }, |
50 |
| - 'hostcrl' => { |
51 |
| - 'path' => "#{location}/ssl/crl.pem", |
52 |
| - 'path_exists' => true, |
53 |
| - }, |
| 22 | + :puppet_ssldir => "#{location}/ssl", |
| 23 | + :puppet_config => "#{location}/puppet.conf", |
| 24 | + :puppet_sslpaths => { |
| 25 | + 'privatedir' => { |
| 26 | + 'path' => "#{location}/ssl/private", |
| 27 | + 'path_exists' => true, |
| 28 | + }, |
| 29 | + 'privatekeydir' => { |
| 30 | + 'path' => "#{location}/ssl/private_keys", |
| 31 | + 'path_exists' => true, |
| 32 | + }, |
| 33 | + 'publickeydir' => { |
| 34 | + 'path' => "#{location}/ssl/public_keys", |
| 35 | + 'path_exists' => true, |
| 36 | + }, |
| 37 | + 'certdir' => { |
| 38 | + 'path' => "#{location}/ssl/certs", |
| 39 | + 'path_exists' => true, |
54 | 40 | },
|
55 |
| - } |
| 41 | + 'requestdir' => { |
| 42 | + 'path' => "#{location}/ssl/certificate_requests", |
| 43 | + 'path_exists' => true, |
| 44 | + }, |
| 45 | + 'hostcrl' => { |
| 46 | + 'path' => "#{location}/ssl/crl.pem", |
| 47 | + 'path_exists' => true, |
| 48 | + }, |
| 49 | + }, |
| 50 | +} |
| 51 | + |
| 52 | +RSpec.configure do |c| |
| 53 | + c.before :each do |
| 54 | + Puppet::Parser::Functions.newfunction(:pe_build_version, type: :rvalue, doc: '') do |args| |
| 55 | + '2018.1.0' |
| 56 | + end |
| 57 | + end |
56 | 58 | end
|
0 commit comments