simp-beaker-helpers 1.25.0 → 1.26.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/simp/beaker_helpers/version.rb +1 -1
- data/lib/simp/rake/beaker.rb +39 -0
- data/spec/acceptance/nodesets/amzn2.yml +0 -1
- data/spec/acceptance/nodesets/default.yml +2 -1
- data/spec/acceptance/nodesets/docker.yml +1 -1
- data/spec/acceptance/nodesets/oel.yml +1 -1
- data/spec/acceptance/nodesets/ubuntu.yml +2 -0
- data/spec/acceptance/suites/default/fixture_modules_spec.rb +11 -11
- data/spec/acceptance/suites/default/pki_tests_spec.rb +8 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b361d19ffb83f7ce149363e948e0e9580d6c85c378638bbaff77d6252d36f1e1
|
4
|
+
data.tar.gz: edaf5e05b246e96ea81e33c588c9c3d71d7e1f610ef5f782e0d02be6dc2c5816
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63232d87cc0b63deef62fbb61964aa0cd2a60935ea5a2746c76cecf2d261601c89b8703e36325052c9243bdee4f023e2591b7dcc8b8354b13cbe0f03c3881d4c
|
7
|
+
data.tar.gz: c2019a1a3aa4fc7b2b4d10e00e1fd87318926c55e9e3572892d24f2b314c37bbdbba7f56ac8fdf20948cf1674a133cf85c82d3366372d8460114ed1e83f7ab0f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
### 1.26.1 / 2022-06-24
|
2
|
+
* Fixed:
|
3
|
+
* Ensure that `multi_node` is enabled by default for backwards compatibility
|
4
|
+
* Sort the discovered nodesets by default when running with `ALL` nodesets
|
5
|
+
|
6
|
+
### 1.26.0 / 2022-06-24
|
7
|
+
* Added:
|
8
|
+
* Allow for sequential nodesets by setting `multi_node: false` in the
|
9
|
+
`CONFIG:` section of your nodeset.
|
10
|
+
|
1
11
|
### 1.25.0 / 2022-06-11
|
2
12
|
* Fixed:
|
3
13
|
* Replaced calls to `sed -c` with something POSIX compliant that should work
|
data/lib/simp/rake/beaker.rb
CHANGED
@@ -225,7 +225,46 @@ module Simp::Rake
|
|
225
225
|
nodesets << File.join(nodeset_path, 'default.yml')
|
226
226
|
end
|
227
227
|
|
228
|
+
refined_nodesets = []
|
229
|
+
|
228
230
|
nodesets.each do |nodeset_yml|
|
231
|
+
parsed_nodeset = ::Beaker::Options::HostsFileParser.parse_hosts_file(nodeset_yml)
|
232
|
+
|
233
|
+
# Default to multi-node testing for backwards compatibility
|
234
|
+
multi_node = (parsed_nodeset[:multi_node] == false ? false: true)
|
235
|
+
|
236
|
+
if multi_node
|
237
|
+
refined_nodesets.push(nodeset_yml)
|
238
|
+
else
|
239
|
+
parsed_nodeset_hosts = parsed_nodeset.delete(:HOSTS)
|
240
|
+
|
241
|
+
parsed_nodeset_hosts.each do |k,v|
|
242
|
+
|
243
|
+
v[:roles] ||= []
|
244
|
+
v[:roles] |= ['default']
|
245
|
+
|
246
|
+
tmp_nodeset = {
|
247
|
+
:HOSTS => { k => v },
|
248
|
+
:CONFIG => parsed_nodeset
|
249
|
+
}
|
250
|
+
|
251
|
+
tmp_nodeset_file = Tempfile.new("nodeset_#{k}-")
|
252
|
+
tmp_nodeset_file.write(tmp_nodeset.to_yaml)
|
253
|
+
tmp_nodeset_file.close
|
254
|
+
|
255
|
+
refined_nodesets.push(tmp_nodeset_file.path)
|
256
|
+
|
257
|
+
at_exit do
|
258
|
+
if tmp_nodeset_file && File.exist?(tmp_nodeset_file.path)
|
259
|
+
tmp_nodeset_file.close
|
260
|
+
tmp_nodeset_file.unlink
|
261
|
+
end
|
262
|
+
end
|
263
|
+
end
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
refined_nodesets.sort.each do |nodeset_yml|
|
229
268
|
unless File.file?(nodeset_yml)
|
230
269
|
# Get here if user has specified a non-existent nodeset or the
|
231
270
|
# implied `default` nodeset does not exist.
|
@@ -8,8 +8,8 @@
|
|
8
8
|
HOSTS:
|
9
9
|
el7:
|
10
10
|
roles:
|
11
|
+
- default
|
11
12
|
- el7
|
12
|
-
- master
|
13
13
|
platform: el-7-x86_64
|
14
14
|
box: centos/7
|
15
15
|
hypervisor: <%= hypervisor %>
|
@@ -22,6 +22,7 @@ HOSTS:
|
|
22
22
|
hypervisor: <%= hypervisor %>
|
23
23
|
|
24
24
|
CONFIG:
|
25
|
+
multi_node: <%= ['yes','true'].include?(ENV['BEAKER_multi_node']) ? true : false %>
|
25
26
|
log_level: verbose
|
26
27
|
type: aio
|
27
28
|
vagrant_cpus: 2
|
@@ -6,41 +6,41 @@ context 'after copy_fixture_modules_to( hosts )' do
|
|
6
6
|
copy_fixture_modules_to( hosts )
|
7
7
|
end
|
8
8
|
|
9
|
-
describe "fact_on(
|
9
|
+
describe "fact_on(default,'root_home')" do
|
10
10
|
it 'should not return value of `root_home`' do
|
11
|
-
expect(fact_on(
|
11
|
+
expect(fact_on(default, 'root_home')).to eq ''
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
describe "pfact_on(
|
15
|
+
describe "pfact_on(default,'root_home')" do
|
16
16
|
it 'should return value of `root_home`' do
|
17
|
-
expect(pfact_on(
|
17
|
+
expect(pfact_on(default, 'root_home')).to eq '/root'
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
describe "pfact_on(
|
21
|
+
describe "pfact_on(default,'os.release.major')" do
|
22
22
|
it 'should return the value of `os.release.major`' do
|
23
|
-
expect(pfact_on(
|
23
|
+
expect(pfact_on(default, 'os.release.major')).to match(/.+/)
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
describe "pfact_on(
|
27
|
+
describe "pfact_on(default,'os.release.foo')" do
|
28
28
|
it 'should not return the value of `os.release.foo`' do
|
29
|
-
expect(pfact_on(
|
29
|
+
expect(pfact_on(default, 'os.release.foo')).to eq ''
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
describe "pfact_on(
|
33
|
+
describe "pfact_on(default,'fips_enabled')" do
|
34
34
|
expected = (ENV['BEAKER_fips'] == 'yes')
|
35
35
|
|
36
36
|
it 'should return false' do
|
37
|
-
expect(pfact_on(
|
37
|
+
expect(pfact_on(default, 'fips_enabled')).to eq expected
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
41
|
describe "pfact_on returns a hash" do
|
42
42
|
it 'should return a Hash' do
|
43
|
-
expect(pfact_on(
|
43
|
+
expect(pfact_on(default, 'os')).to be_a(Hash)
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
@@ -4,21 +4,21 @@ require 'tmpdir'
|
|
4
4
|
|
5
5
|
context 'PKI operations' do
|
6
6
|
|
7
|
-
context 'after run_fake_pki_ca_on(
|
7
|
+
context 'after run_fake_pki_ca_on(default,hosts)' do
|
8
8
|
before(:all) do
|
9
9
|
copy_fixture_modules_to( hosts )
|
10
10
|
end
|
11
11
|
|
12
12
|
shared_examples_for 'a correctly copied keydist/ tree' do |test_dir|
|
13
13
|
it 'correctly copies keydist/ tree' do
|
14
|
-
on(
|
14
|
+
on(default, "ls -d #{test_dir}" +
|
15
15
|
" #{test_dir}/cacerts" +
|
16
16
|
" #{test_dir}/cacerts/cacert_*.pem"
|
17
17
|
)
|
18
18
|
|
19
19
|
hosts.each do |host|
|
20
20
|
name = host.node_name
|
21
|
-
on(
|
21
|
+
on(default, "ls -d #{test_dir}/#{name}/cacerts" +
|
22
22
|
" #{test_dir}/#{name}/#{name}.pem" +
|
23
23
|
" #{test_dir}/#{name}/#{name}.pub" +
|
24
24
|
" #{test_dir}/cacerts/cacert_*.pem"
|
@@ -29,10 +29,10 @@ context 'PKI operations' do
|
|
29
29
|
|
30
30
|
describe 'a Fake CA under /root' do
|
31
31
|
tmp_keydist_dir = Dir.mktmpdir 'simp-beaker-helpers__pki-tests'
|
32
|
-
run_fake_pki_ca_on(
|
32
|
+
run_fake_pki_ca_on( default, hosts, tmp_keydist_dir )
|
33
33
|
|
34
34
|
it 'should create /root/pki' do
|
35
|
-
on(
|
35
|
+
on(default, 'test -d /root/pki')
|
36
36
|
end
|
37
37
|
|
38
38
|
it_behaves_like 'a correctly copied keydist/ tree', '/root/pki/keydist'
|
@@ -41,13 +41,13 @@ context 'PKI operations' do
|
|
41
41
|
|
42
42
|
describe 'after copy_keydist_to' do
|
43
43
|
test_dir = '/etc/puppetlabs/code/environments/production/modules/pki/files/keydist'
|
44
|
-
copy_keydist_to(
|
44
|
+
copy_keydist_to(default)
|
45
45
|
it_behaves_like 'a correctly copied keydist/ tree', test_dir
|
46
46
|
end
|
47
47
|
|
48
|
-
describe 'after copy_keydist_to(
|
48
|
+
describe 'after copy_keydist_to(default,"/tmp/foo")' do
|
49
49
|
test_dir = '/tmp/foo'
|
50
|
-
copy_keydist_to(
|
50
|
+
copy_keydist_to(default, test_dir)
|
51
51
|
it_behaves_like 'a correctly copied keydist/ tree', test_dir
|
52
52
|
end
|
53
53
|
|
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.
|
4
|
+
version: 1.26.1
|
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: 2022-06-
|
12
|
+
date: 2022-06-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: beaker
|