simp-beaker-helpers 1.28.0 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/add_new_issue_to_triage_project.yml +21 -0
- data/.github/workflows/pr_acceptance.yml +34 -15
- data/.github/workflows/pr_glci.yml +5 -5
- data/.github/workflows/pr_glci_cleanup.yml +2 -2
- data/.github/workflows/pr_glci_manual.yml +7 -7
- data/.github/workflows/pr_tests.yml +15 -24
- data/.github/workflows/tag_deploy_rubygem.yml +25 -24
- data/.gitlab-ci.yml +45 -15
- data/.rubocop.yml +21 -24
- data/CHANGELOG.md +22 -1
- data/lib/simp/beaker_helpers/constants.rb +1 -1
- data/lib/simp/beaker_helpers/version.rb +1 -1
- data/lib/simp/beaker_helpers.rb +60 -10
- data/simp-beaker-helpers.gemspec +2 -2
- data/spec/acceptance/nodesets/default.yml +12 -18
- data/spec/acceptance/nodesets/docker.yml +2 -2
- data/spec/acceptance/nodesets/ubuntu.yml +6 -13
- data/spec/acceptance/suites/default/check_puppet_version_spec.rb +13 -13
- data/spec/acceptance/suites/default/fixture_modules_spec.rb +2 -2
- data/spec/acceptance/suites/default/nodesets +1 -1
- data/spec/acceptance/suites/fips_from_fixtures/nodesets +1 -1
- data/spec/acceptance/suites/inspec/nodesets +1 -1
- data/spec/acceptance/suites/snapshot/nodesets +1 -1
- data/spec/acceptance/suites/ssg/nodesets +1 -1
- data/spec/acceptance/suites/windows/nodesets/default.yml +11 -19
- data/spec/acceptance/suites/windows/nodesets/win2012.yml +28 -0
- data/spec/acceptance/suites/windows/nodesets/win2016.yml +11 -18
- data/spec/acceptance/suites/windows/nodesets/win2019.yml +11 -17
- data/spec/lib/simp/beaker_helpers_spec.rb +0 -2
- metadata +9 -8
data/.rubocop.yml
CHANGED
@@ -13,7 +13,7 @@ AllCops:
|
|
13
13
|
- Rakefile
|
14
14
|
- Guardfile
|
15
15
|
- Vagrantfile
|
16
|
-
|
16
|
+
Layout/ConditionPosition:
|
17
17
|
Enabled: True
|
18
18
|
|
19
19
|
Lint/ElseLayout:
|
@@ -22,13 +22,13 @@ Lint/ElseLayout:
|
|
22
22
|
Lint/UnreachableCode:
|
23
23
|
Enabled: True
|
24
24
|
|
25
|
-
Lint/
|
25
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
26
26
|
Enabled: True
|
27
27
|
|
28
28
|
Lint/EnsureReturn:
|
29
29
|
Enabled: True
|
30
30
|
|
31
|
-
Lint/
|
31
|
+
Lint/SuppressedException:
|
32
32
|
Enabled: True
|
33
33
|
|
34
34
|
Lint/LiteralAsCondition:
|
@@ -84,13 +84,13 @@ Lint/AmbiguousRegexpLiteral:
|
|
84
84
|
Security/Eval:
|
85
85
|
Enabled: True
|
86
86
|
|
87
|
-
|
87
|
+
Layout/BlockAlignment:
|
88
88
|
Enabled: True
|
89
89
|
|
90
|
-
|
90
|
+
Layout/DefEndAlignment:
|
91
91
|
Enabled: True
|
92
92
|
|
93
|
-
|
93
|
+
Layout/EndAlignment:
|
94
94
|
Enabled: True
|
95
95
|
|
96
96
|
Lint/DeprecatedClassMethods:
|
@@ -105,7 +105,7 @@ Lint/ParenthesesAsGroupedExpression:
|
|
105
105
|
Lint/RescueException:
|
106
106
|
Enabled: True
|
107
107
|
|
108
|
-
Lint/
|
108
|
+
Lint/RedundantStringCoercion:
|
109
109
|
Enabled: True
|
110
110
|
|
111
111
|
Lint/UnusedBlockArgument:
|
@@ -132,13 +132,13 @@ Naming/AccessorMethodName:
|
|
132
132
|
Style/Alias:
|
133
133
|
Enabled: True
|
134
134
|
|
135
|
-
Layout/
|
135
|
+
Layout/ArrayAlignment:
|
136
136
|
Enabled: True
|
137
137
|
|
138
|
-
Layout/
|
138
|
+
Layout/HashAlignment:
|
139
139
|
Enabled: True
|
140
140
|
|
141
|
-
Layout/
|
141
|
+
Layout/ParameterAlignment:
|
142
142
|
Enabled: True
|
143
143
|
|
144
144
|
Metrics/BlockNesting:
|
@@ -150,9 +150,6 @@ Style/AsciiComments:
|
|
150
150
|
Style/Attr:
|
151
151
|
Enabled: True
|
152
152
|
|
153
|
-
Style/BracesAroundHashParameters:
|
154
|
-
Enabled: True
|
155
|
-
|
156
153
|
Style/CaseEquality:
|
157
154
|
Enabled: True
|
158
155
|
|
@@ -187,16 +184,16 @@ Style/WhenThen:
|
|
187
184
|
Style/WordArray:
|
188
185
|
Enabled: True
|
189
186
|
|
190
|
-
Style/
|
187
|
+
Style/RedundantPercentQ:
|
191
188
|
Enabled: True
|
192
189
|
|
193
|
-
Layout/
|
190
|
+
Layout/IndentationStyle:
|
194
191
|
Enabled: True
|
195
192
|
|
196
193
|
Layout/SpaceBeforeSemicolon:
|
197
194
|
Enabled: True
|
198
195
|
|
199
|
-
Layout/
|
196
|
+
Layout/TrailingEmptyLines:
|
200
197
|
Enabled: True
|
201
198
|
|
202
199
|
Layout/SpaceInsideBlockBraces:
|
@@ -281,10 +278,10 @@ Style/EachWithObject:
|
|
281
278
|
Layout/EmptyLineBetweenDefs:
|
282
279
|
Enabled: True
|
283
280
|
|
284
|
-
Layout/
|
281
|
+
Layout/FirstArrayElementIndentation:
|
285
282
|
Enabled: True
|
286
283
|
|
287
|
-
Layout/
|
284
|
+
Layout/FirstHashElementIndentation:
|
288
285
|
Enabled: True
|
289
286
|
|
290
287
|
Layout/IndentationConsistency:
|
@@ -306,7 +303,7 @@ Style/EmptyLiteral:
|
|
306
303
|
Layout/TrailingWhitespace:
|
307
304
|
Enabled: True
|
308
305
|
|
309
|
-
|
306
|
+
Layout/LineLength:
|
310
307
|
Enabled: False
|
311
308
|
|
312
309
|
Naming/BinaryOperatorParameterName:
|
@@ -331,7 +328,10 @@ Style/StringLiterals:
|
|
331
328
|
Style/TrailingCommaInArguments:
|
332
329
|
Enabled: True
|
333
330
|
|
334
|
-
Style/
|
331
|
+
Style/TrailingCommaInArrayLiteral:
|
332
|
+
Enabled: True
|
333
|
+
|
334
|
+
Style/TrailingCommaInHashLiteral:
|
335
335
|
Enabled: True
|
336
336
|
|
337
337
|
Style/GlobalVars:
|
@@ -497,9 +497,6 @@ Metrics/AbcSize:
|
|
497
497
|
Metrics/PerceivedComplexity:
|
498
498
|
Enabled: False
|
499
499
|
|
500
|
-
Lint/UselessAssignment:
|
501
|
-
Enabled: True
|
502
|
-
|
503
500
|
Layout/ClosingParenthesisIndentation:
|
504
501
|
Enabled: True
|
505
502
|
|
@@ -529,7 +526,7 @@ RSpec/NestedGroups:
|
|
529
526
|
Enabled: False
|
530
527
|
|
531
528
|
# this is broken on ruby1.9
|
532
|
-
Layout/
|
529
|
+
Layout/HeredocIndentation:
|
533
530
|
Enabled: False
|
534
531
|
|
535
532
|
# disable Yaml safe_load. This is needed to support ruby2.0.0 development envs
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
### 1.30.0 / 2023-05-15
|
2
|
+
* Added:
|
3
|
+
* Default `puppet_collection` to `puppet7`
|
4
|
+
* Support for new pulp-slimmed repo names in `install_simp_repos` logic
|
5
|
+
* Modernize GHA PR test matrix
|
6
|
+
* Support for experimental (Puppet 8.x/ruby 3.1)
|
7
|
+
* Add GHA acceptance test matrix (puppet version x suite)
|
8
|
+
* Support for experimental (Puppet 8.x/ruby 3.1)
|
9
|
+
* Allow problematic inspec suite to fail
|
10
|
+
* Fixed:
|
11
|
+
* Update to `beaker-rspec` 8.x depsolve with `simp-rake-helpers` 5.20.0+
|
12
|
+
* Update `beaker` to permit 5.x
|
13
|
+
* Update default `puppet-agent` to 7.x
|
14
|
+
* Use less fragile yum/dnf `repolist` in `install_simp_repos` logic
|
15
|
+
* Removed
|
16
|
+
* inspec acceptance suite no longer required in GHA matrix
|
17
|
+
|
18
|
+
### 1.29.0 / 2022-10-25
|
19
|
+
* Fixed:
|
20
|
+
* Compress fixtures before copy to Windows nodes
|
21
|
+
|
1
22
|
### 1.28.0 / 2022-08-05
|
2
23
|
* Added:
|
3
24
|
* Support RHEL versions without RHN credentials
|
@@ -27,7 +48,7 @@
|
|
27
48
|
on non-RHEL systems
|
28
49
|
* Added:
|
29
50
|
* Updated all dependencies to their latest versions where possible and removed
|
30
|
-
|
51
|
+
dependencies on deprecated libraries.
|
31
52
|
|
32
53
|
### 1.24.5 / 2022-05-06
|
33
54
|
* Fixed:
|
@@ -5,7 +5,7 @@ module Simp::BeakerHelpers
|
|
5
5
|
#
|
6
6
|
# This is done so that we know if some new thing that we're using breaks the
|
7
7
|
# oldest system that we support
|
8
|
-
DEFAULT_PUPPET_AGENT_VERSION = '~>
|
8
|
+
DEFAULT_PUPPET_AGENT_VERSION = '~> 7.0'
|
9
9
|
|
10
10
|
SSG_REPO_URL = ENV['BEAKER_ssg_repo'] || 'https://github.com/ComplianceAsCode/content.git'
|
11
11
|
|
data/lib/simp/beaker_helpers.rb
CHANGED
@@ -11,6 +11,7 @@ module Simp::BeakerHelpers
|
|
11
11
|
require 'simp/beaker_helpers/snapshot'
|
12
12
|
require 'simp/beaker_helpers/ssg'
|
13
13
|
require 'simp/beaker_helpers/version'
|
14
|
+
require 'find'
|
14
15
|
|
15
16
|
@run_in_parallel = (ENV['BEAKER_SIMP_parallel'] == 'yes')
|
16
17
|
|
@@ -395,14 +396,44 @@ module Simp::BeakerHelpers
|
|
395
396
|
Dir.chdir(mod_root) do
|
396
397
|
# Have to do things the slow way on Windows
|
397
398
|
if is_windows?(sut)
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
399
|
+
begin
|
400
|
+
zipfile = "#{Simp::BeakerHelpers.tmpname}.zip"
|
401
|
+
files = []
|
402
|
+
|
403
|
+
# 'zip -x' does not reliably exclude paths, so we need to remove them from
|
404
|
+
# the list of files to zip
|
405
|
+
Dir.glob('*') do |module_root|
|
406
|
+
next unless Dir.exist?(module_root)
|
407
|
+
Find.find("#{module_root}/") do |path|
|
408
|
+
if PUPPET_MODULE_INSTALL_IGNORE.any? { |ignore| path.include?(ignore) }
|
409
|
+
Find.prune
|
410
|
+
next
|
411
|
+
end
|
412
|
+
|
413
|
+
files << path
|
414
|
+
end
|
415
|
+
end
|
416
|
+
|
417
|
+
command = ['zip', zipfile] + files
|
418
|
+
Kernel.system(*command)
|
419
|
+
|
420
|
+
raise("Error: module zip file '#{zipfile}' could not be created at #{mod_root}") unless File.exist?(zipfile)
|
421
|
+
copy_to(sut, zipfile, target_module_path, opts)
|
422
|
+
|
423
|
+
# Windows 2012 and R2 does not natively include PowerShell 5, in which
|
424
|
+
# the Expand-Archive cmdlet was introduced
|
425
|
+
if fact_on(sut, 'os.release.major').include?('2012')
|
426
|
+
unzip_cmd = [
|
427
|
+
"\"[System.Reflection.Assembly]::LoadWithPartialName(\'System.IO.Compression.FileSystem\')",
|
428
|
+
"[System.IO.Compression.ZipFile]::OpenRead(\'#{target_module_path}\\#{File.basename(zipfile)}\').Entries.FullName \| %{Remove-Item -Path (\"\"\"#{target_module_path}\\$_\"\"\") -Recurse -Force -Confirm:$false -ErrorAction SilentlyContinue}", # rubocop:disable Layout/LineLength
|
429
|
+
"[System.IO.Compression.ZipFile]::ExtractToDirectory(\'#{target_module_path}\\#{File.basename(zipfile)}\', \'#{target_module_path}\')\"",
|
430
|
+
].join(';')
|
431
|
+
else
|
432
|
+
unzip_cmd = "$ProgressPreference='SilentlyContinue';Expand-Archive -Path #{target_module_path}\\#{File.basename(zipfile)} -DestinationPath #{target_module_path} -Force"
|
405
433
|
end
|
434
|
+
on(sut, powershell(unzip_cmd))
|
435
|
+
ensure
|
436
|
+
FileUtils.remove_entry(zipfile, true)
|
406
437
|
end
|
407
438
|
else
|
408
439
|
begin
|
@@ -1392,7 +1423,7 @@ module Simp::BeakerHelpers
|
|
1392
1423
|
unless result
|
1393
1424
|
puppet_gems = nil
|
1394
1425
|
|
1395
|
-
Bundler.
|
1426
|
+
Bundler.with_unbundled_env do
|
1396
1427
|
puppet_gems = %x(gem search -ra -e puppet).match(/\((.+)\)/)
|
1397
1428
|
end
|
1398
1429
|
|
@@ -1540,25 +1571,43 @@ module Simp::BeakerHelpers
|
|
1540
1571
|
to_disable += ENV.fetch('BEAKER_SIMP_disable_repos', '').split(',').map(&:strip)
|
1541
1572
|
|
1542
1573
|
unless to_disable.empty?
|
1543
|
-
if to_disable.include?('simp')
|
1574
|
+
if to_disable.include?('simp') || to_disable.include?('simp-community-simp')
|
1544
1575
|
to_disable.delete('simp')
|
1576
|
+
|
1577
|
+
# legacy community RPM
|
1545
1578
|
to_disable << 'simp-community-simp'
|
1579
|
+
|
1580
|
+
# SIMP 6.6+ community RPM
|
1581
|
+
to_disable << 'SIMP--simp'
|
1546
1582
|
end
|
1547
1583
|
|
1548
1584
|
if to_disable.include?('simp_deps')
|
1549
1585
|
to_disable.delete('simp_deps')
|
1586
|
+
# legacy community RPM
|
1550
1587
|
to_disable << 'simp-community-epel'
|
1551
1588
|
to_disable << 'simp-community-postgres'
|
1552
1589
|
to_disable << 'simp-community-puppet'
|
1590
|
+
|
1591
|
+
# SIMP 6.6+ community RPM
|
1592
|
+
to_disable << 'epel--simp'
|
1593
|
+
to_disable << 'postgresql--simp'
|
1594
|
+
to_disable << 'puppet--simp'
|
1595
|
+
to_disable << 'puppet7--simp'
|
1596
|
+
to_disable << 'puppet6--simp'
|
1553
1597
|
end
|
1554
1598
|
|
1599
|
+
logger.info(%{INFO: repos to disable: '#{to_disable.join("', '")}'.})
|
1600
|
+
|
1555
1601
|
# NOTE: This --enablerepo enables the repos for listing and is inherited
|
1556
1602
|
# from YUM. This does not actually "enable" the repos, that would require
|
1557
1603
|
# the "--enable" option (from yum-config-manager) :-D.
|
1558
1604
|
#
|
1559
1605
|
# Note: Certain versions of EL8 do not dump by default and EL7 does not
|
1560
1606
|
# have the '--dump' option.
|
1561
|
-
|
1607
|
+
x = on(sut, %{yum repolist all || dnf repolist --all}).stdout.lines
|
1608
|
+
y = x.map{|z| z.gsub(%r{/.*\Z},'')}
|
1609
|
+
available_repos = y.grep(/\A([a-zA-Z][a-zA-Z0-9:_-]+)\s*/){|x| $1}
|
1610
|
+
logger.info(%{INFO: available repos: '#{available_repos.join("', '")}'.})
|
1562
1611
|
|
1563
1612
|
invalid_repos = (to_disable - available_repos)
|
1564
1613
|
|
@@ -1567,6 +1616,7 @@ module Simp::BeakerHelpers
|
|
1567
1616
|
logger.warn(%{WARN: install_simp_repo - requested repos to disable do not exist on the target system '#{invalid_repos.join("', '")}'.})
|
1568
1617
|
end
|
1569
1618
|
|
1619
|
+
|
1570
1620
|
(to_disable - invalid_repos).each do |repo|
|
1571
1621
|
on(sut, %{yum-config-manager --disable "#{repo}"})
|
1572
1622
|
end
|
data/simp-beaker-helpers.gemspec
CHANGED
@@ -21,8 +21,8 @@ Gem::Specification.new do |s|
|
|
21
21
|
|
22
22
|
s.required_ruby_version = '>= 2.3.0'
|
23
23
|
|
24
|
-
s.add_runtime_dependency 'beaker' , ['>= 4.17.0', '<
|
25
|
-
s.add_runtime_dependency 'beaker-rspec' , '~>
|
24
|
+
s.add_runtime_dependency 'beaker' , ['>= 4.17.0', '< 6.0.0']
|
25
|
+
s.add_runtime_dependency 'beaker-rspec' , '~> 8.0'
|
26
26
|
s.add_runtime_dependency 'beaker-puppet' , ['>= 1.18.14', '< 2.0.0']
|
27
27
|
s.add_runtime_dependency 'beaker-docker' , ['>= 0.8.3', '< 2.0.0']
|
28
28
|
s.add_runtime_dependency 'docker-api' , ['>= 2.1.0', '< 3.0.0']
|
@@ -1,34 +1,27 @@
|
|
1
|
-
|
2
|
-
if ENV['BEAKER_HYPERVISOR']
|
3
|
-
hypervisor = ENV['BEAKER_HYPERVISOR']
|
4
|
-
else
|
5
|
-
hypervisor = 'vagrant'
|
6
|
-
end
|
7
|
-
-%>
|
1
|
+
---
|
8
2
|
HOSTS:
|
9
3
|
el7:
|
10
4
|
roles:
|
11
|
-
|
12
|
-
|
5
|
+
- default
|
6
|
+
- el7
|
13
7
|
platform: el-7-x86_64
|
14
8
|
box: centos/7
|
15
|
-
hypervisor: <%=
|
16
|
-
|
9
|
+
hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
|
10
|
+
family: centos-cloud/centos-7
|
11
|
+
gce_machine_type: n1-standard-2
|
17
12
|
el8:
|
18
13
|
roles:
|
19
|
-
|
14
|
+
- el8
|
20
15
|
platform: el-8-x86_64
|
21
16
|
box: centos/stream8
|
22
|
-
hypervisor: <%=
|
23
|
-
|
17
|
+
hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
|
18
|
+
family: centos-cloud/centos-stream-8
|
19
|
+
gce_machine_type: n1-standard-2
|
24
20
|
CONFIG:
|
25
|
-
multi_node:
|
21
|
+
multi_node: false
|
26
22
|
log_level: verbose
|
27
23
|
type: aio
|
28
24
|
vagrant_cpus: 2
|
29
|
-
<% if ENV['BEAKER_PUPPET_COLLECTION'] -%>
|
30
|
-
puppet_collection: <%= ENV['BEAKER_PUPPET_COLLECTION'] %>
|
31
|
-
<% end -%>
|
32
25
|
ssh:
|
33
26
|
keepalive: true
|
34
27
|
keepalive_interval: 10
|
@@ -40,3 +33,4 @@ CONFIG:
|
|
40
33
|
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:encryption].join("\n#{' '*6}- ") %>
|
41
34
|
hmac:
|
42
35
|
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:hmac].join("\n#{' '*6}- ") %>
|
36
|
+
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet7') %>"
|
@@ -6,7 +6,7 @@ HOSTS:
|
|
6
6
|
platform: el-7-x86_64
|
7
7
|
hypervisor: docker
|
8
8
|
image: simpproject/simp_beaker_el7
|
9
|
-
docker_cmd: '
|
9
|
+
docker_cmd: '/usr/sbin/sshd -D -E /var/log/sshd.log'
|
10
10
|
|
11
11
|
el8.test.net:
|
12
12
|
roles:
|
@@ -14,7 +14,7 @@ HOSTS:
|
|
14
14
|
platform: el-8-x86_64
|
15
15
|
hypervisor: docker
|
16
16
|
image: simpproject/simp_beaker_el8
|
17
|
-
docker_cmd: '
|
17
|
+
docker_cmd: '/usr/sbin/sshd -D -E /var/log/sshd.log'
|
18
18
|
|
19
19
|
CONFIG:
|
20
20
|
log_level: verbose
|
@@ -1,21 +1,14 @@
|
|
1
|
-
|
2
|
-
if ENV['BEAKER_HYPERVISOR']
|
3
|
-
hypervisor = ENV['BEAKER_HYPERVISOR']
|
4
|
-
else
|
5
|
-
hypervisor = 'vagrant'
|
6
|
-
end
|
7
|
-
-%>
|
1
|
+
---
|
8
2
|
HOSTS:
|
9
3
|
focal:
|
10
4
|
roles:
|
11
|
-
|
5
|
+
- default
|
12
6
|
platform: ubuntu-20.04-x86_64
|
13
7
|
box: ubuntu/focal64
|
14
|
-
hypervisor: <%=
|
15
|
-
|
8
|
+
hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
|
9
|
+
family: ubuntu-os-cloud/ubuntu-2004-lts
|
10
|
+
gce_machine_type: n1-standard-2
|
16
11
|
CONFIG:
|
17
12
|
log_level: verbose
|
18
13
|
type: aio
|
19
|
-
|
20
|
-
puppet_collection: <%= ENV['BEAKER_PUPPET_COLLECTION'] %>
|
21
|
-
<% end -%>
|
14
|
+
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet7') %>"
|
@@ -1,22 +1,22 @@
|
|
1
1
|
require 'spec_helper_acceptance'
|
2
2
|
|
3
|
+
unless ENV['PUPPET_VERSION'] || ENV['BEAKER_PUPPET_COLLECTION']
|
4
|
+
fail('You must set either PUPPET_VERSION or BEAKER_PUPPET_COLLECTION as an environment variable')
|
5
|
+
end
|
6
|
+
|
7
|
+
if ENV['BEAKER_PUPPET_COLLECTION']
|
8
|
+
target_version = ENV['BEAKER_PUPPET_COLLECTION'][/(\d+)$/,1]
|
9
|
+
elsif ENV['PUPPET_VERSION']
|
10
|
+
target_version = ENV['PUPPET_VERSION'].split('.').first
|
11
|
+
end
|
12
|
+
|
3
13
|
hosts.each do |host|
|
4
14
|
describe 'make sure puppet version is valid' do
|
5
15
|
context "on #{host}" do
|
6
|
-
|
7
|
-
|
8
|
-
client_puppet_version = on(host, 'puppet --version').stdout.strip
|
9
|
-
|
10
|
-
if puppet_collection =~ /puppet(\d+)/
|
11
|
-
puppet_collection_version = $1
|
16
|
+
client_puppet_version = on(host, 'puppet --version').output.lines.last.strip
|
12
17
|
|
13
|
-
|
14
|
-
|
15
|
-
end
|
16
|
-
else
|
17
|
-
it 'should be running puppet 6' do
|
18
|
-
expect(client_puppet_version.split('.').first).to eq '6'
|
19
|
-
end
|
18
|
+
it "should be running puppet version #{target_version}" do
|
19
|
+
expect(Gem::Version.new(client_puppet_version)).to be >= Gem::Version.new(target_version)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -8,7 +8,7 @@ context 'after copy_fixture_modules_to( hosts )' do
|
|
8
8
|
|
9
9
|
describe "fact_on(default,'root_home')" do
|
10
10
|
it 'should not return value of `root_home`' do
|
11
|
-
expect(fact_on(default, 'root_home')).to eq ''
|
11
|
+
expect(fact_on(default, 'root_home').to_s).to eq ''
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -26,7 +26,7 @@ context 'after copy_fixture_modules_to( hosts )' do
|
|
26
26
|
|
27
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(default, 'os.release.foo')).to eq ''
|
29
|
+
expect(pfact_on(default, 'os.release.foo').to_s).to eq ''
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
@@ -1,34 +1,26 @@
|
|
1
|
-
|
2
|
-
if ENV['BEAKER_HYPERVISOR']
|
3
|
-
hypervisor = ENV['BEAKER_HYPERVISOR']
|
4
|
-
else
|
5
|
-
hypervisor = 'vagrant'
|
6
|
-
end
|
7
|
-
-%>
|
1
|
+
---
|
8
2
|
HOSTS:
|
9
3
|
win:
|
10
4
|
roles:
|
11
|
-
|
5
|
+
- windows
|
12
6
|
platform: windows-server-amd64
|
13
|
-
box:
|
14
|
-
hypervisor: <%=
|
7
|
+
box: gusztavvargadr/windows-server
|
8
|
+
hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
|
15
9
|
vagrant_memsize: 2048
|
16
10
|
vagrant_cpus: 2
|
17
11
|
user: vagrant
|
18
12
|
is_cygwin: false
|
19
|
-
|
20
|
-
|
21
|
-
|
13
|
+
family: windows-cloud/windows-2022
|
14
|
+
gce_machine_type: n1-standard-2
|
22
15
|
el7:
|
23
16
|
roles:
|
24
|
-
|
17
|
+
- default
|
25
18
|
platform: el-7-x86_64
|
26
19
|
box: centos/7
|
27
|
-
hypervisor: <%=
|
28
|
-
|
20
|
+
hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
|
21
|
+
family: centos-cloud/centos-7
|
22
|
+
gce_machine_type: n1-standard-2
|
29
23
|
CONFIG:
|
30
24
|
log_level: verbose
|
31
25
|
type: aio
|
32
|
-
|
33
|
-
puppet_environment: <%= ENV['BEAKER_PUPPET_ENVIRONMENT'] %>
|
34
|
-
<% end -%>
|
26
|
+
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet7') %>"
|
@@ -0,0 +1,28 @@
|
|
1
|
+
---
|
2
|
+
HOSTS:
|
3
|
+
win:
|
4
|
+
roles:
|
5
|
+
- windows
|
6
|
+
platform: windows-server-amd64
|
7
|
+
box: devopsgroup-io/windows_server-2012r2-standard-amd64-nocm
|
8
|
+
hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
|
9
|
+
vagrant_memsize: 2048
|
10
|
+
vagrant_cpus: 2
|
11
|
+
user: vagrant
|
12
|
+
is_cygwin: false
|
13
|
+
ssh:
|
14
|
+
host_key: ssh-dss
|
15
|
+
family: windows-cloud/windows-2012-r2
|
16
|
+
gce_machine_type: n1-standard-2
|
17
|
+
el7:
|
18
|
+
roles:
|
19
|
+
- default
|
20
|
+
platform: el-7-x86_64
|
21
|
+
box: centos/7
|
22
|
+
hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
|
23
|
+
family: centos-cloud/centos-7
|
24
|
+
gce_machine_type: n1-standard-2
|
25
|
+
CONFIG:
|
26
|
+
log_level: verbose
|
27
|
+
type: aio
|
28
|
+
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet7') %>"
|
@@ -1,34 +1,27 @@
|
|
1
|
-
|
2
|
-
if ENV['BEAKER_HYPERVISOR']
|
3
|
-
hypervisor = ENV['BEAKER_HYPERVISOR']
|
4
|
-
else
|
5
|
-
hypervisor = 'vagrant'
|
6
|
-
end
|
7
|
-
-%>
|
1
|
+
---
|
8
2
|
HOSTS:
|
9
3
|
win:
|
10
4
|
roles:
|
11
|
-
|
5
|
+
- windows
|
12
6
|
platform: windows-server-amd64
|
13
|
-
box:
|
14
|
-
|
15
|
-
hypervisor: <%= hypervisor %>
|
7
|
+
box: peru/windows-server-2016-standard-x64-eval
|
8
|
+
hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
|
16
9
|
vagrant_memsize: 2048
|
17
10
|
vagrant_cpus: 2
|
18
11
|
user: vagrant
|
19
12
|
communicator: winrm
|
20
13
|
is_cygwin: false
|
21
|
-
|
14
|
+
family: windows-cloud/windows-2016
|
15
|
+
gce_machine_type: n1-standard-2
|
22
16
|
el7:
|
23
17
|
roles:
|
24
|
-
|
18
|
+
- default
|
25
19
|
platform: el-7-x86_64
|
26
20
|
box: centos/7
|
27
|
-
hypervisor: <%=
|
28
|
-
|
21
|
+
hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
|
22
|
+
family: centos-cloud/centos-7
|
23
|
+
gce_machine_type: n1-standard-2
|
29
24
|
CONFIG:
|
30
25
|
log_level: verbose
|
31
26
|
type: aio
|
32
|
-
|
33
|
-
puppet_environment: <%= ENV['BEAKER_PUPPET_ENVIRONMENT'] %>
|
34
|
-
<% end -%>
|
27
|
+
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet7') %>"
|