simp-rspec-puppet-facts 3.2.0 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 205ae23b3c8f2ca7906df0304031dedd248b252f361e272951ea412454410215
4
- data.tar.gz: b9c8a94db91d26fc14b4abe35ab8268ca7009bda3074b01cf432c88d8b30f9aa
3
+ metadata.gz: 6e8d9fad1aa3966ba0b10ec96114c3ab144b89ff10dc57c5f8f1f199cc8ff662
4
+ data.tar.gz: 9a60cfc0600977155cf59a4b654e4fbfb8329ac9091fcaf9b88c5f14a41e4428
5
5
  SHA512:
6
- metadata.gz: 6c9e042dd207860d53feddbf051ab4056538f511cb3f881a1e713abccb8dabf44e3281ab70e3b288f1274f3531869c3cb429714af132503f24f063f39f85be2c
7
- data.tar.gz: b82e1db7b52e737acec2fa08d0b0544f3f78292dce66365fe3362bed2f377ad54ef1cc23bba014600764d64566a13744fd4966b21f8434afa753bd6eb20551c7
6
+ metadata.gz: ecc5c61ee334f6fd1c6640431be7a000a7c51fce7df43d6b4c1ce1eaa4b296e3b10d68f0abf73c33e67ca18482aea253967b3336652dab42336d01fb1e4d1b28
7
+ data.tar.gz: a34d41d23d7a2decf270325546befc08c01c6ca8b37d5591816a859542d032d937681f3d9cd542465c0b4ac052bebf34b207729b71eccb13cd036e62b3db4c73
data/README.md CHANGED
@@ -111,13 +111,17 @@ facts_hash.values_at(:selinux,:selinux_current_mode,:selinux_state,:tmp_mount_de
111
111
 
112
112
  ### `SIMP_FACTS_OS`
113
113
 
114
- Restricts test matrix to the OS strings provided in a comma-delimited list.
115
- - **Example:** `SIMP_FACTS_OS=redhat-6-x86_64,redhat-7-x86_64`
114
+ Restricts test matrix to OS strings/partial strings/regexps provided in a
115
+ comma-delimited list.
116
+
117
+ - **Example:** `SIMP_FACTS_OS=redhat-7-x86_64,centos`
116
118
 
117
119
 
118
120
  ### `SIMP_FACTS_lsb`
119
121
 
120
- - `no`
122
+ Mock the output of historical lsb facts
123
+
124
+ - Disable by setting to `no`
121
125
 
122
126
 
123
127
  ## How to capture new facts
@@ -73,10 +73,10 @@ module Simp::RspecPuppetFacts
73
73
  facts.merge! opts.fetch( :extra_facts_immutable, {} )
74
74
  end
75
75
 
76
- if ( ENV.fetch('SIMP_FACTS_OS',nil) &&
77
- !ENV['SIMP_FACTS_OS'].strip.empty? &&
76
+ if ( ENV['SIMP_FACTS_OS'] &&
77
+ !ENV['SIMP_FACTS_OS'].to_s.strip.empty? &&
78
78
  ENV['SIMP_FACTS_OS'] !~ /all/i )
79
- unless ENV['SIMP_FACTS_OS'].strip.split(/[ ,]+/).include? os
79
+ unless ENV['SIMP_FACTS_OS'].strip.split(/[ ,]+/).any?{|str| os == str || os.match?(%r[#{str}]) }
80
80
  h.delete(os)
81
81
  end
82
82
  end
data/lib/simp/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Simp; end
2
2
  module Simp::RspecPuppetFacts
3
- VERSION = '3.2.0'
3
+ VERSION = '3.3.0'
4
4
  end
@@ -15,27 +15,31 @@
15
15
  {
16
16
  "operatingsystem": "CentOS",
17
17
  "operatingsystemrelease": [
18
- "6",
19
- "7"
18
+ "7",
19
+ "8"
20
20
  ]
21
21
  },
22
22
  {
23
23
  "operatingsystem": "RedHat",
24
24
  "operatingsystemrelease": [
25
- "6",
26
- "7"
25
+ "7",
26
+ "8"
27
27
  ]
28
28
  }
29
29
  ],
30
30
  "puppet_version": [
31
- "2.7",
32
- "3.0",
33
- "3.1",
34
- "3.2",
35
- "3.3",
36
- "3.4",
37
- "3.5",
38
- "3.6",
39
- "3.7"
31
+ "5.5",
32
+ "6.0",
33
+ "6.4",
34
+ "6.5",
35
+ "6.6",
36
+ "6.16",
37
+ "6.18",
38
+ "6.22",
39
+ "7.0",
40
+ "7.0",
41
+ "7.4",
42
+ "7.5",
43
+ "7.6"
40
44
  ]
41
45
  }
@@ -24,22 +24,22 @@ describe 'Simp::RspecPuppetFacts' do
24
24
  expect(subject.size).to be >= 4
25
25
  end
26
26
  it 'should return supported OS' do
27
- expect(subject.keys.sort).to include 'centos-6-x86_64'
28
27
  expect(subject.keys.sort).to include 'centos-7-x86_64'
29
- expect(subject.keys.sort).to include 'redhat-6-x86_64'
28
+ expect(subject.keys.sort).to include 'centos-8-x86_64'
30
29
  expect(subject.keys.sort).to include 'redhat-7-x86_64'
30
+ expect(subject.keys.sort).to include 'redhat-8-x86_64'
31
31
  end
32
32
  it 'should return SIMP-specific OS facts' do
33
33
  grub_version_facts = subject.map{ |os,data| {os =>
34
34
  data.select{ |x,v| x == :uid_min || x == :grub_version }}}
35
35
  expect( grub_version_facts ).to include(
36
- {"centos-6-x86_64"=>{:uid_min=>"500", :grub_version=>"0.97"}}
36
+ {"centos-8-x86_64"=>{:uid_min=>"1000", :grub_version=>"2.03"}}
37
37
  )
38
38
  expect( grub_version_facts ).to include(
39
39
  {"centos-7-x86_64"=>{:uid_min=>"1000", :grub_version=>"2.02~beta2"}}
40
40
  )
41
41
  expect( grub_version_facts ).to include(
42
- {"redhat-6-x86_64"=>{:uid_min=>"500", :grub_version=>"0.97"}}
42
+ {"redhat-8-x86_64"=>{:uid_min=>"1000", :grub_version=>"2.03"}}
43
43
  )
44
44
  expect( grub_version_facts ).to include(
45
45
  {"redhat-7-x86_64"=>{:uid_min=>"1000", :grub_version=>"2.02~beta2"}}
@@ -81,7 +81,7 @@ describe 'Simp::RspecPuppetFacts' do
81
81
  context 'When specifying SIMP_FACTS_OS=redhat-6-x86_64,redhat-7-x86_64' do
82
82
  subject {
83
83
  x = ENV['SIMP_FACTS_OS']
84
- ENV['SIMP_FACTS_OS']='redhat-6-x86_64,redhat-7-x86_64'
84
+ ENV['SIMP_FACTS_OS']='centos,redhat-7-x86_64'
85
85
  h = on_supported_os()
86
86
  ENV['SIMP_FACTS_OS']=x
87
87
  h
@@ -89,12 +89,13 @@ describe 'Simp::RspecPuppetFacts' do
89
89
  it 'should return a hash' do
90
90
  expect(subject.class).to eq Hash
91
91
  end
92
- it 'should have 2 elements' do
93
- expect(subject.size).to eq 2
92
+ it 'should have 3 elements' do
93
+ expect(subject.size).to eq 3
94
94
  end
95
95
  it 'should return supported OS' do
96
96
  expect(subject.keys.sort).to eq [
97
- 'redhat-6-x86_64',
97
+ 'centos-7-x86_64',
98
+ 'centos-8-x86_64',
98
99
  'redhat-7-x86_64',
99
100
  ]
100
101
  end
@@ -117,8 +118,9 @@ describe 'Simp::RspecPuppetFacts' do
117
118
  )
118
119
  }
119
120
 
120
- it 'should output warning message' do
121
- expect { subject }.to output(/Can't find facts for 'debian-X-x86_64'/).to_stderr
121
+
122
+ it 'should output warning message', skip: "rspec issue: No longer able to catch message on stdout or stderr" do
123
+ expect { subject }.to output(%r(No facts were found in the FacterDB)).to_stdout
122
124
  end
123
125
  end
124
126
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-rspec-puppet-facts
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Tessmer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-06-02 00:00:00.000000000 Z
12
+ date: 2021-06-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec-puppet-facts
@@ -231,66 +231,66 @@ specification_version: 4
231
231
  summary: standard SIMP facts fixtures for Puppet
232
232
  test_files:
233
233
  - Rakefile
234
- - spec/simp_rspec_puppet_facts_spec.rb
235
234
  - spec/fixtures/metadata.json
236
235
  - spec/fixtures/metadata.json_with_missing_operatingsystem_support
236
+ - spec/simp_rspec_puppet_facts_spec.rb
237
237
  - spec/spec_helper_acceptance.rb
238
238
  - spec/acceptance/suites/default/nodesets
239
239
  - spec/acceptance/suites/default/00_default_spec.rb
240
- - spec/acceptance/nodesets/rocky8.yml
241
- - spec/acceptance/nodesets/rhel8.yml
242
- - spec/acceptance/nodesets/win_2016.yml
243
- - spec/acceptance/nodesets/oel7.yml
244
240
  - spec/acceptance/nodesets/centos7.yml
245
- - spec/acceptance/nodesets/rhel7.yml
246
- - spec/acceptance/nodesets/centos8.yml
247
- - spec/acceptance/nodesets/oel8.yml
248
241
  - spec/acceptance/nodesets/win_2012r2.yml
242
+ - spec/acceptance/nodesets/centos8.yml
243
+ - spec/acceptance/nodesets/rocky8.yml
249
244
  - spec/acceptance/nodesets/win_2019.yml
245
+ - spec/acceptance/nodesets/oel7.yml
246
+ - spec/acceptance/nodesets/win_2016.yml
247
+ - spec/acceptance/nodesets/oel8.yml
248
+ - spec/acceptance/nodesets/rhel8.yml
249
+ - spec/acceptance/nodesets/rhel7.yml
250
250
  - spec/data_normalization_spec.rb
251
251
  - spec/spec_helper.rb
252
- - facts/puppetfiles/Puppetfile.6.0.0-0
253
- - facts/scripts/get_facts_for_each_facter.sh
254
- - facts/scripts/get_facts.rb
252
+ - facts/scripts/gce_scrub_data/redhat-7-x86_64.scrub.yaml
255
253
  - facts/scripts/gce_scrub_data/centos-6-x86_64.scrub.yaml
254
+ - facts/scripts/gce_scrub_data/oraclelinux-6-x86_64.scrub.yaml
256
255
  - facts/scripts/gce_scrub_data/redhat-6-x86_64.scrub.yaml
257
- - facts/scripts/gce_scrub_data/redhat-7-x86_64.scrub.yaml
258
256
  - facts/scripts/gce_scrub_data/centos-7-x86_64.scrub.yaml
259
257
  - facts/scripts/gce_scrub_data/oraclelinux-7-x86_64.scrub.yaml
260
- - facts/scripts/gce_scrub_data/oraclelinux-6-x86_64.scrub.yaml
258
+ - facts/scripts/get_facts.rb
261
259
  - facts/scripts/gce_scrub_data.rb
262
- - facts/Vagrantfile
263
- - facts/3.5/oraclelinux-6-x86_64.facts
264
- - facts/3.5/redhat-7-x86_64.facts
265
- - facts/3.5/redhat-6-x86_64.facts
260
+ - facts/scripts/get_facts_for_each_facter.sh
261
+ - facts/puppetfiles/Puppetfile.6.0.0-0
262
+ - facts/3.6/centos-6-x86_64.facts
263
+ - facts/3.6/oraclelinux-7-x86_64.facts
264
+ - facts/3.6/centos-7-x86_64.facts
265
+ - facts/3.6/oraclelinux-6-x86_64.facts
266
+ - facts/3.6/amazon-2-x86_64.facts
267
+ - facts/3.6/redhat-6-x86_64.facts
268
+ - facts/3.6/redhat-7-x86_64.facts
269
+ - facts/3.5/centos-6-x86_64.facts
266
270
  - facts/3.5/oraclelinux-7-x86_64.facts
267
271
  - facts/3.5/centos-7-x86_64.facts
268
- - facts/3.5/centos-6-x86_64.facts
269
- - facts/3.4/oraclelinux-6-x86_64.facts
270
- - facts/3.4/redhat-7-x86_64.facts
271
- - facts/3.4/redhat-6-x86_64.facts
272
+ - facts/3.5/oraclelinux-6-x86_64.facts
273
+ - facts/3.5/redhat-6-x86_64.facts
274
+ - facts/3.5/redhat-7-x86_64.facts
275
+ - facts/3.4/centos-6-x86_64.facts
272
276
  - facts/3.4/oraclelinux-7-x86_64.facts
273
277
  - facts/3.4/centos-7-x86_64.facts
274
- - facts/3.4/centos-6-x86_64.facts
275
- - facts/2.5/windows-2016-x86_64.facts
276
- - facts/2.5/rocky-8-x86_64.facts
277
- - facts/2.5/oraclelinux-6-x86_64.facts
278
- - facts/2.5/redhat-7-x86_64.facts
279
- - facts/2.5/oraclelinux-8-x86_64.facts
280
- - facts/2.5/redhat-6-x86_64.facts
281
- - facts/2.5/amazon-2-x86_64.facts
278
+ - facts/3.4/oraclelinux-6-x86_64.facts
279
+ - facts/3.4/redhat-6-x86_64.facts
280
+ - facts/3.4/redhat-7-x86_64.facts
282
281
  - facts/2.5/windows-2019-x86_64.facts
282
+ - facts/2.5/centos-6-x86_64.facts
283
283
  - facts/2.5/oraclelinux-7-x86_64.facts
284
- - facts/2.5/redhat-8-x86_64.facts
284
+ - facts/2.5/centos-7-x86_64.facts
285
+ - facts/2.5/oraclelinux-6-x86_64.facts
286
+ - facts/2.5/amazon-2-x86_64.facts
287
+ - facts/2.5/redhat-6-x86_64.facts
288
+ - facts/2.5/windows-2016-x86_64.facts
285
289
  - facts/2.5/windows-2012-r2-x86_64.facts
290
+ - facts/2.5/oraclelinux-8-x86_64.facts
291
+ - facts/2.5/rocky-8-x86_64.facts
286
292
  - facts/2.5/centos-8-x86_64.facts
287
- - facts/2.5/centos-7-x86_64.facts
288
- - facts/2.5/centos-6-x86_64.facts
293
+ - facts/2.5/redhat-8-x86_64.facts
294
+ - facts/2.5/redhat-7-x86_64.facts
295
+ - facts/Vagrantfile
289
296
  - facts/Gemfile
290
- - facts/3.6/oraclelinux-6-x86_64.facts
291
- - facts/3.6/redhat-7-x86_64.facts
292
- - facts/3.6/redhat-6-x86_64.facts
293
- - facts/3.6/amazon-2-x86_64.facts
294
- - facts/3.6/oraclelinux-7-x86_64.facts
295
- - facts/3.6/centos-7-x86_64.facts
296
- - facts/3.6/centos-6-x86_64.facts