simp-beaker-helpers 1.18.1 → 1.18.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/lib/simp/beaker_helpers.rb +16 -19
- data/lib/simp/beaker_helpers/inspec.rb +1 -1
- data/lib/simp/beaker_helpers/snapshot.rb +3 -5
- data/lib/simp/beaker_helpers/ssg.rb +35 -0
- data/lib/simp/beaker_helpers/version.rb +1 -1
- data/lib/simp/beaker_helpers/windows.rb +16 -0
- data/simp-beaker-helpers.gemspec +2 -2
- data/spec/acceptance/suites/default/nodesets +1 -1
- data/spec/acceptance/suites/fips_from_fixtures/nodesets +1 -1
- data/spec/acceptance/suites/snapshot/00_snapshot_test_spec.rb +1 -1
- data/spec/acceptance/suites/snapshot/nodesets +1 -1
- metadata +38 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0db7d012be090122587cb25885faf36c1d8717d3c9f6e86714adb558512ea280
|
4
|
+
data.tar.gz: 7a4e2a70a8fb671f140bc9f44598898eb95c4b7eef3b43f4fd6ea85ed7901bfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9262da4359d9ca19e65349c3ba6f44f55323167aea9343ae93f8222e70145d6264d90403de65b3874bbe1ebd59e11f826bc9f65c3f2fdaa4e15ccb492a2c42eb
|
7
|
+
data.tar.gz: cf24bab582eb4c373b46d6c7e597e5e690d1a163c49b85d816ef4926ea78959959acaa81c215a5ee6f1678a01271a3dac3ca66d77de1e51707775d93ec9de093
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
|
+
### 1.18.6 / 2020-06-24
|
2
|
+
* Fix Vagrant snapshot issues
|
3
|
+
|
4
|
+
### 1.18.5 / 2020-06-24
|
5
|
+
* Allow Vagrant to connect to EL8+ hosts in FIPS mode
|
6
|
+
* Add EL8 support to the SSG scans
|
7
|
+
|
8
|
+
### 1.18.4 / 2020-03-31
|
9
|
+
* Fix capturing error messages when inspec fails to generate results
|
10
|
+
|
11
|
+
### 1.18.3 / 2020-02-24
|
12
|
+
* Fix the Windows library loading location.
|
13
|
+
* No longer attempt to load windows libraries by default unless the system is
|
14
|
+
actually Windows
|
15
|
+
|
16
|
+
### 1.18.2 / 2020-02-24
|
17
|
+
|
18
|
+
* The previous location for loading the Windows libraries would not work in a
|
19
|
+
`:before` block. This moves it into its own module space.
|
20
|
+
* Bump to the working version of beaker and beaker-puppet
|
21
|
+
|
1
22
|
### 1.18.1 / 2020-02-12
|
2
23
|
* Fix gemspec dependencies
|
24
|
+
* Fix the windows library loading location
|
3
25
|
|
4
26
|
### 1.18.0 / 2020-02-06
|
5
27
|
* Update Windows support
|
data/lib/simp/beaker_helpers.rb
CHANGED
@@ -19,23 +19,7 @@ module Simp::BeakerHelpers
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def is_windows?(sut)
|
22
|
-
|
23
|
-
|
24
|
-
if is_windows
|
25
|
-
begin
|
26
|
-
require 'beaker-windows'
|
27
|
-
rescue LoadError
|
28
|
-
logger.error(%{You must include 'beaker-windows' in your Gemfile for windows support on #{host}})
|
29
|
-
exit 1
|
30
|
-
end
|
31
|
-
|
32
|
-
include BeakerWindows::Path
|
33
|
-
include BeakerWindows::Powershell
|
34
|
-
include BeakerWindows::Registry
|
35
|
-
include BeakerWindows::WindowsFeature
|
36
|
-
end
|
37
|
-
|
38
|
-
return is_windows
|
22
|
+
sut[:platform] =~ /windows/i
|
39
23
|
end
|
40
24
|
|
41
25
|
# We can't cache this because it may change during a run
|
@@ -296,7 +280,7 @@ module Simp::BeakerHelpers
|
|
296
280
|
parallel = (ENV['BEAKER_SIMP_parallel'] == 'yes')
|
297
281
|
|
298
282
|
block_on(suts, :run_in_parallel => parallel) do |sut|
|
299
|
-
if sut
|
283
|
+
if is_windows?(sut)
|
300
284
|
puts " -- SKIPPING #{sut} because it is windows"
|
301
285
|
next
|
302
286
|
end
|
@@ -343,6 +327,16 @@ module Simp::BeakerHelpers
|
|
343
327
|
|
344
328
|
# Enable FIPS and then reboot to finish.
|
345
329
|
on(sut, %(puppet apply --verbose #{fips_enable_modulepath} -e "class { 'fips': enabled => true }"))
|
330
|
+
|
331
|
+
# Work around Vagrant and cipher restrictions in EL8+
|
332
|
+
#
|
333
|
+
# Hopefully, Vagrant will update the used ciphers at some point but who
|
334
|
+
# knows when that will be
|
335
|
+
opensshserver_config = '/etc/crypto-policies/back-ends/opensshserver.config'
|
336
|
+
if file_exists_on(host, opensshserver_config)
|
337
|
+
on(host, "sed --follow-symlinks -i 's/PubkeyAcceptedKeyTypes=/PubkeyAcceptedKeyTypes=ssh-rsa,/' #{opensshserver_config}")
|
338
|
+
end
|
339
|
+
|
346
340
|
sut.reboot
|
347
341
|
end
|
348
342
|
end
|
@@ -622,7 +616,10 @@ module Simp::BeakerHelpers
|
|
622
616
|
def fix_errata_on( suts = hosts )
|
623
617
|
parallel = (ENV['BEAKER_SIMP_parallel'] == 'yes')
|
624
618
|
block_on(suts, :run_in_parallel => parallel) do |sut|
|
625
|
-
if sut
|
619
|
+
if is_windows?(sut)
|
620
|
+
# Load the Windows requirements
|
621
|
+
require 'simp/beaker_helpers/windows'
|
622
|
+
|
626
623
|
# Install the necessary windows certificate for testing
|
627
624
|
#
|
628
625
|
# https://petersouter.xyz/testing-windows-with-beaker-without-cygwin/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Simp::BeakerHelpers
|
2
|
-
# Helpers for
|
2
|
+
# Helpers for managing Vagrant snapshots
|
3
3
|
class Snapshot
|
4
4
|
# The name of the base snapshot that is created if no snapshots currently exist
|
5
5
|
BASE_NAME = '_simp_beaker_base'
|
@@ -18,9 +18,7 @@ module Simp::BeakerHelpers
|
|
18
18
|
|
19
19
|
if vdir
|
20
20
|
Dir.chdir(vdir) do
|
21
|
-
unless exist?(host, BASE_NAME)
|
22
|
-
save(host, BASE_NAME)
|
23
|
-
end
|
21
|
+
save(host, BASE_NAME) unless exist?(host, BASE_NAME)
|
24
22
|
|
25
23
|
snap = "#{host.name}_#{snapshot_name}"
|
26
24
|
|
@@ -67,7 +65,7 @@ module Simp::BeakerHelpers
|
|
67
65
|
Dir.chdir(vdir) do
|
68
66
|
output = %x(vagrant snapshot list #{host.name}).lines
|
69
67
|
output.map! do |x|
|
70
|
-
x.split(/^#{host.name}_/).last.strip
|
68
|
+
x.split(/^#{host.name}_/).last.split(':').first.delete('==>').strip
|
71
69
|
end
|
72
70
|
end
|
73
71
|
end
|
@@ -29,6 +29,17 @@ module Simp::BeakerHelpers
|
|
29
29
|
'python-jinja2'
|
30
30
|
]
|
31
31
|
|
32
|
+
EL8_PACKAGES = [
|
33
|
+
'python3',
|
34
|
+
'python3-pyyaml',
|
35
|
+
'cmake',
|
36
|
+
'git',
|
37
|
+
'openscap-python3',
|
38
|
+
'openscap-utils',
|
39
|
+
'python3-lxml',
|
40
|
+
'python3-jinja2'
|
41
|
+
]
|
42
|
+
|
32
43
|
OS_INFO = {
|
33
44
|
'RedHat' => {
|
34
45
|
'6' => {
|
@@ -46,6 +57,14 @@ module Simp::BeakerHelpers
|
|
46
57
|
'build_target' => 'rhel7',
|
47
58
|
'datastream' => 'ssg-rhel7-ds.xml'
|
48
59
|
}
|
60
|
+
},
|
61
|
+
'8' => {
|
62
|
+
'required_packages' => EL8_PACKAGES,
|
63
|
+
'ssg' => {
|
64
|
+
'profile_target' => 'rhel8',
|
65
|
+
'build_target' => 'rhel8',
|
66
|
+
'datastream' => 'ssg-rhel8-ds.xml'
|
67
|
+
}
|
49
68
|
}
|
50
69
|
},
|
51
70
|
'CentOS' => {
|
@@ -64,6 +83,14 @@ module Simp::BeakerHelpers
|
|
64
83
|
'build_target' => 'centos7',
|
65
84
|
'datastream' => 'ssg-centos7-ds.xml'
|
66
85
|
}
|
86
|
+
},
|
87
|
+
'8' => {
|
88
|
+
'required_packages' => EL8_PACKAGES,
|
89
|
+
'ssg' => {
|
90
|
+
'profile_target' => 'rhel8',
|
91
|
+
'build_target' => 'centos8',
|
92
|
+
'datastream' => 'ssg-centos8-ds.xml'
|
93
|
+
}
|
67
94
|
}
|
68
95
|
},
|
69
96
|
'OracleLinux' => {
|
@@ -73,8 +100,16 @@ module Simp::BeakerHelpers
|
|
73
100
|
'profile_target' => 'ol7',
|
74
101
|
'build_target' => 'ol7',
|
75
102
|
'datastream' => 'ssg-ol7-ds.xml'
|
103
|
+
},
|
104
|
+
'8' => {
|
105
|
+
'required_packages' => EL8_PACKAGES,
|
106
|
+
'ssg' => {
|
107
|
+
'profile_target' => 'ol8',
|
108
|
+
'build_target' => 'ol8',
|
109
|
+
'datastream' => 'ssg-ol8-ds.xml'
|
76
110
|
}
|
77
111
|
}
|
112
|
+
}
|
78
113
|
}
|
79
114
|
}
|
80
115
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Simp; end
|
2
|
+
module Simp::BeakerHelpers; end
|
3
|
+
|
4
|
+
module Simp::BeakerHelpers::Windows
|
5
|
+
begin
|
6
|
+
require 'beaker-windows'
|
7
|
+
rescue LoadError
|
8
|
+
logger.error(%{You must include 'beaker-windows' in your Gemfile for windows support})
|
9
|
+
exit 1
|
10
|
+
end
|
11
|
+
|
12
|
+
include BeakerWindows::Path
|
13
|
+
include BeakerWindows::Powershell
|
14
|
+
include BeakerWindows::Registry
|
15
|
+
include BeakerWindows::WindowsFeature
|
16
|
+
end
|
data/simp-beaker-helpers.gemspec
CHANGED
@@ -18,9 +18,9 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.metadata = {
|
19
19
|
'issue_tracker' => 'https://simp-project.atlassian.net'
|
20
20
|
}
|
21
|
-
s.add_runtime_dependency 'beaker' , ['>= 4.
|
21
|
+
s.add_runtime_dependency 'beaker' , ['>= 4.17.0', '< 5.0.0']
|
22
22
|
s.add_runtime_dependency 'beaker-rspec' , '~> 6.2'
|
23
|
-
s.add_runtime_dependency 'beaker-puppet' , ['>= 1.18.
|
23
|
+
s.add_runtime_dependency 'beaker-puppet' , ['>= 1.18.14', '< 2.0.0']
|
24
24
|
s.add_runtime_dependency 'beaker-docker' , '~> 0.3'
|
25
25
|
s.add_runtime_dependency 'beaker-vagrant' , ['>= 0.6.4', '< 2.0.0']
|
26
26
|
s.add_runtime_dependency 'beaker-puppet_install_helper', '~> 0.9'
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
@@ -57,7 +57,7 @@ hosts.each do |host|
|
|
57
57
|
end
|
58
58
|
|
59
59
|
it 'can list the snapshots' do
|
60
|
-
expect(Simp::BeakerHelpers::Snapshot.list(host)).to eq ['test', 'test2']
|
60
|
+
expect(Simp::BeakerHelpers::Snapshot.list(host)).to eq ["#{host}", 'test', 'test2']
|
61
61
|
end
|
62
62
|
|
63
63
|
it 'can query for a specific snapshot' do
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simp-beaker-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.18.
|
4
|
+
version: 1.18.6
|
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: 2020-
|
12
|
+
date: 2020-06-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: beaker
|
@@ -17,7 +17,7 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 4.
|
20
|
+
version: 4.17.0
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 5.0.0
|
@@ -27,7 +27,7 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: 4.
|
30
|
+
version: 4.17.0
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 5.0.0
|
@@ -51,7 +51,7 @@ dependencies:
|
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.18.
|
54
|
+
version: 1.18.14
|
55
55
|
- - "<"
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: 2.0.0
|
@@ -61,7 +61,7 @@ dependencies:
|
|
61
61
|
requirements:
|
62
62
|
- - ">="
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: 1.18.
|
64
|
+
version: 1.18.14
|
65
65
|
- - "<"
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: 2.0.0
|
@@ -183,6 +183,7 @@ files:
|
|
183
183
|
- lib/simp/beaker_helpers/snapshot.rb
|
184
184
|
- lib/simp/beaker_helpers/ssg.rb
|
185
185
|
- lib/simp/beaker_helpers/version.rb
|
186
|
+
- lib/simp/beaker_helpers/windows.rb
|
186
187
|
- lib/simp/rake/beaker.rb
|
187
188
|
- simp-beaker-helpers.gemspec
|
188
189
|
- spec/acceptance/nodesets/default.yml
|
@@ -234,9 +235,37 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
234
235
|
- !ruby/object:Gem::Version
|
235
236
|
version: '0'
|
236
237
|
requirements: []
|
237
|
-
|
238
|
-
rubygems_version: 2.7.7
|
238
|
+
rubygems_version: 3.0.6
|
239
239
|
signing_key:
|
240
240
|
specification_version: 4
|
241
241
|
summary: beaker helper methods for SIMP
|
242
|
-
test_files:
|
242
|
+
test_files:
|
243
|
+
- spec/acceptance/nodesets/default.yml
|
244
|
+
- spec/acceptance/suites/default/check_puppet_version_spec.rb
|
245
|
+
- spec/acceptance/suites/default/enable_fips_spec.rb
|
246
|
+
- spec/acceptance/suites/default/fixture_modules_spec.rb
|
247
|
+
- spec/acceptance/suites/default/install_simp_deps_repo_spec.rb
|
248
|
+
- spec/acceptance/suites/default/nodesets
|
249
|
+
- spec/acceptance/suites/default/pki_tests_spec.rb
|
250
|
+
- spec/acceptance/suites/default/set_hieradata_on_spec.rb
|
251
|
+
- spec/acceptance/suites/default/write_hieradata_to_spec.rb
|
252
|
+
- spec/acceptance/suites/fips_from_fixtures/00_default_spec.rb
|
253
|
+
- spec/acceptance/suites/fips_from_fixtures/metadata.yml
|
254
|
+
- spec/acceptance/suites/fips_from_fixtures/nodesets
|
255
|
+
- spec/acceptance/suites/offline/00_default_spec.rb
|
256
|
+
- spec/acceptance/suites/offline/README
|
257
|
+
- spec/acceptance/suites/offline/nodesets/default.yml
|
258
|
+
- spec/acceptance/suites/puppet_collections/00_default_spec.rb
|
259
|
+
- spec/acceptance/suites/puppet_collections/metadata.yml
|
260
|
+
- spec/acceptance/suites/puppet_collections/nodesets/default.yml
|
261
|
+
- spec/acceptance/suites/snapshot/00_snapshot_test_spec.rb
|
262
|
+
- spec/acceptance/suites/snapshot/10_general_usage_spec.rb
|
263
|
+
- spec/acceptance/suites/snapshot/nodesets
|
264
|
+
- spec/acceptance/suites/windows/00_default_spec.rb
|
265
|
+
- spec/acceptance/suites/windows/metadata.yml
|
266
|
+
- spec/acceptance/suites/windows/nodesets/default.yml
|
267
|
+
- spec/acceptance/suites/windows/nodesets/win2016.yml
|
268
|
+
- spec/acceptance/suites/windows/nodesets/win2019.yml
|
269
|
+
- spec/lib/simp/beaker_helpers_spec.rb
|
270
|
+
- spec/spec_helper.rb
|
271
|
+
- spec/spec_helper_acceptance.rb
|