simp-beaker-helpers 1.20.0 → 1.22.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.fips_fixtures +1 -0
- data/.github/workflows/pr_glci.yml +190 -0
- data/.github/workflows/pr_glci_cleanup.yml +105 -0
- data/.github/workflows/pr_glci_manual.yml +143 -0
- data/.github/workflows/tag_deploy_rubygem.yml +152 -0
- data/.gitlab-ci.yml +24 -37
- data/CHANGELOG.md +53 -0
- data/README.md +63 -5
- data/lib/simp/beaker_helpers.rb +431 -237
- data/lib/simp/beaker_helpers/version.rb +1 -1
- data/lib/simp/rake/beaker.rb +6 -0
- data/simp-beaker-helpers.gemspec +3 -0
- data/spec/acceptance/nodesets/docker.yml +36 -0
- data/spec/acceptance/suites/default/check_puppet_version_spec.rb +1 -1
- data/spec/acceptance/suites/default/fixture_modules_spec.rb +6 -0
- data/spec/acceptance/suites/default/install_simp_deps_repo_spec.rb +17 -5
- data/spec/acceptance/suites/default/nodesets +1 -1
- data/spec/acceptance/suites/fips_from_fixtures/00_default_spec.rb +1 -0
- data/spec/acceptance/suites/fips_from_fixtures/nodesets +1 -1
- data/spec/acceptance/suites/snapshot/nodesets +1 -1
- metadata +14 -8
- data/.travis.yml +0 -42
data/lib/simp/rake/beaker.rb
CHANGED
@@ -196,6 +196,7 @@ module Simp::Rake
|
|
196
196
|
default_suite = ordered_suites.delete('default')
|
197
197
|
ordered_suites.unshift(default_suite) if default_suite
|
198
198
|
|
199
|
+
suite_start_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
199
200
|
ordered_suites.each do |ste|
|
200
201
|
|
201
202
|
next unless (suites[ste]['default_run'] == true)
|
@@ -255,6 +256,11 @@ module Simp::Rake
|
|
255
256
|
$stdout.puts("\n\n=== Suite '#{name}' Complete ===\n\n")
|
256
257
|
end
|
257
258
|
end
|
259
|
+
suite_end_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
260
|
+
|
261
|
+
suite_run_time = ((suite_end_time - suite_start_time)/60).round(2)
|
262
|
+
|
263
|
+
$stdout.puts("== Total Runtime: #{suite_run_time} minutes ==\n\n")
|
258
264
|
|
259
265
|
unless failures.keys.empty?
|
260
266
|
$stdout.puts("The following tests had failures:")
|
data/simp-beaker-helpers.gemspec
CHANGED
@@ -18,6 +18,9 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.metadata = {
|
19
19
|
'issue_tracker' => 'https://simp-project.atlassian.net'
|
20
20
|
}
|
21
|
+
|
22
|
+
s.required_ruby_version = '>= 2.3.0'
|
23
|
+
|
21
24
|
s.add_runtime_dependency 'beaker' , ['>= 4.17.0', '< 5.0.0']
|
22
25
|
s.add_runtime_dependency 'beaker-rspec' , '~> 6.2'
|
23
26
|
s.add_runtime_dependency 'beaker-puppet' , ['>= 1.18.14', '< 2.0.0']
|
@@ -0,0 +1,36 @@
|
|
1
|
+
HOSTS:
|
2
|
+
el7:
|
3
|
+
roles:
|
4
|
+
- el7
|
5
|
+
- master
|
6
|
+
platform: el-7-x86_64
|
7
|
+
hypervisor: docker
|
8
|
+
image: simpproject/simp_build_centos7
|
9
|
+
docker_cmd: '/usr/sbin/sshd -D -E /var/log/sshd.log'
|
10
|
+
|
11
|
+
el8:
|
12
|
+
roles:
|
13
|
+
- el8
|
14
|
+
platform: el-8-x86_64
|
15
|
+
hypervisor: docker
|
16
|
+
image: simpproject/simp_build_centos8
|
17
|
+
docker_cmd: '["/sbin/init"]'
|
18
|
+
|
19
|
+
CONFIG:
|
20
|
+
docker_preserve_image: true
|
21
|
+
log_level: verbose
|
22
|
+
type: aio
|
23
|
+
<% if ENV['BEAKER_PUPPET_COLLECTION'] -%>
|
24
|
+
puppet_collection: <%= ENV['BEAKER_PUPPET_COLLECTION'] %>
|
25
|
+
<% end -%>
|
26
|
+
ssh:
|
27
|
+
keepalive: true
|
28
|
+
keepalive_interval: 10
|
29
|
+
host_key:
|
30
|
+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:host_key].join("\n#{' '*6}- ") %>
|
31
|
+
kex:
|
32
|
+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:kex].join("\n#{' '*6}- ") %>
|
33
|
+
encryption:
|
34
|
+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:encryption].join("\n#{' '*6}- ") %>
|
35
|
+
hmac:
|
36
|
+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:hmac].join("\n#{' '*6}- ") %>
|
@@ -5,7 +5,7 @@ hosts.each do |host|
|
|
5
5
|
context "on #{host}" do
|
6
6
|
puppet_collection = host.options[:puppet_collection]
|
7
7
|
|
8
|
-
client_puppet_version = on(host, 'puppet --version').
|
8
|
+
client_puppet_version = on(host, 'puppet --version').stdout.strip
|
9
9
|
|
10
10
|
if puppet_collection =~ /puppet(\d+)/
|
11
11
|
puppet_collection_version = $1
|
@@ -37,4 +37,10 @@ context 'after copy_fixture_modules_to( hosts )' do
|
|
37
37
|
expect(pfact_on(master, 'fips_enabled')).to eq expected
|
38
38
|
end
|
39
39
|
end
|
40
|
+
|
41
|
+
describe "pfact_on returns a hash" do
|
42
|
+
it 'should return a Hash' do
|
43
|
+
expect(pfact_on(master, 'os')).to be_a(Hash)
|
44
|
+
end
|
45
|
+
end
|
40
46
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'spec_helper_acceptance'
|
2
2
|
|
3
3
|
hosts.each do |host|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
end
|
4
|
+
expect_failures = false
|
5
|
+
if hosts_with_role(hosts, 'el8').include?(host)
|
6
|
+
expect_failures = true
|
7
|
+
end
|
9
8
|
|
9
|
+
describe '#install_simp_repos' do
|
10
10
|
it 'should install yum utils' do
|
11
11
|
host.install_package('yum-utils')
|
12
12
|
end
|
@@ -21,6 +21,18 @@ hosts.each do |host|
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
+
context 'when targeting a release type' do
|
25
|
+
it 'adjusts the SIMP release target' do
|
26
|
+
set_simp_repo_release(host, 'rolling')
|
27
|
+
expect(file_content_on(host, '/etc/yum/vars/simpreleasetype').strip).to eq('rolling')
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'lists the simp rpm' do
|
31
|
+
skip "#{host} is not supported yet" if expect_failures
|
32
|
+
on(host, 'yum list simp')
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
24
36
|
context 'when passed a disabled list ' do
|
25
37
|
before(:all) { install_simp_repos(host, ['simp-community-simp'] ) }
|
26
38
|
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
spec/acceptance/suites/default/../../nodesets
|
@@ -18,6 +18,7 @@ new_fixtures = {
|
|
18
18
|
}
|
19
19
|
}
|
20
20
|
|
21
|
+
new_fixtures['fixtures']['repositories']['crypto_policy'] = 'https://github.com/simp/pupmod-simp-crypto_policy'
|
21
22
|
new_fixtures['fixtures']['repositories']['fips'] = 'https://github.com/simp/pupmod-simp-fips'
|
22
23
|
new_fixtures['fixtures']['repositories']['augeasproviders_core'] = 'https://github.com/simp/augeasproviders_core'
|
23
24
|
new_fixtures['fixtures']['repositories']['augeasproviders_grub'] = 'https://github.com/simp/augeasproviders_grub'
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
spec/acceptance/suites/fips_from_fixtures/../../nodesets
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
spec/acceptance/suites/snapshot/../../nodesets
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
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.22.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Tessmer
|
8
8
|
- Trevor Vaughan
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-01
|
12
|
+
date: 2021-03-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: beaker
|
@@ -163,11 +163,14 @@ extra_rdoc_files: []
|
|
163
163
|
files:
|
164
164
|
- ".fips_fixtures"
|
165
165
|
- ".fixtures.yml"
|
166
|
+
- ".github/workflows/pr_glci.yml"
|
167
|
+
- ".github/workflows/pr_glci_cleanup.yml"
|
168
|
+
- ".github/workflows/pr_glci_manual.yml"
|
169
|
+
- ".github/workflows/tag_deploy_rubygem.yml"
|
166
170
|
- ".gitignore"
|
167
171
|
- ".gitlab-ci.yml"
|
168
172
|
- ".rspec"
|
169
173
|
- ".rubocop.yml"
|
170
|
-
- ".travis.yml"
|
171
174
|
- CHANGELOG.md
|
172
175
|
- Gemfile
|
173
176
|
- LICENSE
|
@@ -188,6 +191,7 @@ files:
|
|
188
191
|
- lib/simp/rake/beaker.rb
|
189
192
|
- simp-beaker-helpers.gemspec
|
190
193
|
- spec/acceptance/nodesets/default.yml
|
194
|
+
- spec/acceptance/nodesets/docker.yml
|
191
195
|
- spec/acceptance/nodesets/ubuntu.yml
|
192
196
|
- spec/acceptance/suites/default/check_puppet_version_spec.rb
|
193
197
|
- spec/acceptance/suites/default/enable_fips_spec.rb
|
@@ -221,7 +225,7 @@ licenses:
|
|
221
225
|
- Apache-2.0
|
222
226
|
metadata:
|
223
227
|
issue_tracker: https://simp-project.atlassian.net
|
224
|
-
post_install_message:
|
228
|
+
post_install_message:
|
225
229
|
rdoc_options: []
|
226
230
|
require_paths:
|
227
231
|
- lib
|
@@ -229,19 +233,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
229
233
|
requirements:
|
230
234
|
- - ">="
|
231
235
|
- !ruby/object:Gem::Version
|
232
|
-
version:
|
236
|
+
version: 2.3.0
|
233
237
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
234
238
|
requirements:
|
235
239
|
- - ">="
|
236
240
|
- !ruby/object:Gem::Version
|
237
241
|
version: '0'
|
238
242
|
requirements: []
|
239
|
-
|
240
|
-
|
243
|
+
rubyforge_project:
|
244
|
+
rubygems_version: 2.7.10
|
245
|
+
signing_key:
|
241
246
|
specification_version: 4
|
242
247
|
summary: beaker helper methods for SIMP
|
243
248
|
test_files:
|
244
249
|
- spec/acceptance/nodesets/default.yml
|
250
|
+
- spec/acceptance/nodesets/docker.yml
|
245
251
|
- spec/acceptance/nodesets/ubuntu.yml
|
246
252
|
- spec/acceptance/suites/default/check_puppet_version_spec.rb
|
247
253
|
- spec/acceptance/suites/default/enable_fips_spec.rb
|
data/.travis.yml
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
---
|
2
|
-
language: shell
|
3
|
-
notifications:
|
4
|
-
email: false
|
5
|
-
stages:
|
6
|
-
- name: deploy
|
7
|
-
if: 'tag IS present'
|
8
|
-
|
9
|
-
### Testing on Travis CI is indefinitely disabled
|
10
|
-
###
|
11
|
-
### See:
|
12
|
-
### * https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing
|
13
|
-
### * https://simp-project.atlassian.net/browse/SIMP-8703
|
14
|
-
jobs:
|
15
|
-
include:
|
16
|
-
- stage: deploy
|
17
|
-
script: skip
|
18
|
-
cache: bundler
|
19
|
-
before_install:
|
20
|
-
- rm Gemfile.lock || true
|
21
|
-
bundler_args: "--without development --path .vendor"
|
22
|
-
language: ruby
|
23
|
-
rvm: 2.4.5
|
24
|
-
before_deploy:
|
25
|
-
- bundle exec rake clobber
|
26
|
-
- "export GEM_VERSION=`ruby -r ./lib/simp/beaker_helpers/version.rb -e 'puts Simp::BeakerHelpers::VERSION'`"
|
27
|
-
- '[[ $TRAVIS_TAG =~ ^${GEM_VERSION}$ ]]'
|
28
|
-
deploy:
|
29
|
-
- provider: rubygems
|
30
|
-
gemspec: simp-beaker-helpers.gemspec
|
31
|
-
gem: simp-beaker-helpers
|
32
|
-
token:
|
33
|
-
secure: "AlnBx0dBSxn+S97n0h14ltKUOA+6v0bc7QZPIcwGJV9nnf1hKH3pf9La1TVknEx7XgpAcM9jusQJ7hBlqvSq8z8SFF0bZk1EgSRIKc1cuYPLiGyUM2O7+AFHyCy3iCnPvKeoQmE/BJb5O1dGnbmSbf4A0fqLxA7jiHG1j7z+cnmJB1i67wovDfl13TsOXyBfbespWBMMc0BKAw56FPs9XggAk2cNusS3hd5tqW1AZPT2/xwt+d8ngkmO96u8QcichYRFQ+w+XW4H0w935wNg/dWiskJlt7TIYVAh4Ko5s2DZKf52Tne8TugALSn0LhRatpp7sw1FTTpteCW8UqK8uwGC2hM4pZViAOv4P1YObz2IPOZPriBl+cCayJdMKnotkUJliAMnw5TLiSWKLou+S0Pdj2h3fJZWdOEwRPMzIVoJtsOHG3GdNcPL6f7iU0vP/wr6FeR3uWa+fA7NHRi2Du955O8JpogjdrW08ahcAEwhtI3A4mrA08wN09axsrwr093uDRm/5h4FHyAhExJ0YiA/6kcPpUvILcLStyHe0RQDICQMdsQo2DSbnL65w3QjFa2fML2Shf9cRwX06+ia2BxozWzFD/6p3RiRtPxphnbFiUdjYSGWcwCcUgbJx9SW04lSSxOhpyItuXgxZqiybkzstXd6riu5zwg1R8TWk34="
|
34
|
-
on:
|
35
|
-
tags: true
|
36
|
-
condition: "($SKIP_PUBLISH != true)"
|
37
|
-
- provider: releases
|
38
|
-
token:
|
39
|
-
secure: "I41p4aqjkrNDHJhZ5gWC4gzn7BVwEYRm5Q3PAxQRSIUDB/QTVgNqZx8YptkuIvSGpw8kIywyZg3NKdzGUO8aJJ0NlXapL7e9qQIigkYhdaCZjZFG5zIxdOFs4sVoz/6vnQT9JIcGWy7uS5xiNOulGvfEWU78+e+I9yPdT74RApve5VAVT/km5lV5ldRnwwehLnTx+volUlnOD8rwfizoVLqFTrfRfr4cVMF605UYyaiVxHF50hywFRZoAdVcMEhlLQnQXfz/ZsLMJLJm9eCpjQ989N0oX6theSLCcv7QtHcWMXydjWMcpuTfBZSFrwUVbC23uMOKTJVEWq5LMG3m2L6hP3//2gvUzGhOVLvoGuC+erboB7QoXdcoOgXY+dTZPMcPBxpArdDLWVQSLTvPs05QzpaUdRLVMC/kD1d1EudlEicgkNgNDBhBn3089nVmvKndbKLvj+23a5AQVVbs+8C0x+SJvTc9N2N+bmuH7jIJPrEvWK4xwcQa+g2M/EBv05jaEdSErlVa6B6UKCH0Lea9rpy1se9vn5OzpaaMCCJIpcpQqHDjo0PMAQXBSbqjKcBei6lR5fIFl5UO9gWP1v8PGPuCzGTBivQ92XlgV1TWXmdbJHwIuSbJx3Ali7Wp19RR4E4uHC+TPFssvgkh9ZLkORnWWS35wzzU1LkwWx0="
|
40
|
-
on:
|
41
|
-
tags: true
|
42
|
-
condition: "($SKIP_PUBLISH != true)"
|