simp-beaker-helpers 1.18.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.fixtures.yml +8 -0
- data/.gitignore +8 -0
- data/.gitlab-ci.yml +163 -0
- data/.rspec +4 -0
- data/.rubocop.yml +546 -0
- data/.travis.yml +36 -0
- data/CHANGELOG.md +231 -0
- data/Gemfile +51 -0
- data/LICENSE +27 -0
- data/README.md +543 -0
- data/Rakefile +151 -0
- data/files/pki/clean.sh +1 -0
- data/files/pki/make.sh +101 -0
- data/files/pki/template_ca.cnf +259 -0
- data/files/pki/template_host.cnf +263 -0
- data/files/puppet-agent-versions.yaml +46 -0
- data/lib/simp/beaker_helpers.rb +1231 -0
- data/lib/simp/beaker_helpers/constants.rb +25 -0
- data/lib/simp/beaker_helpers/inspec.rb +328 -0
- data/lib/simp/beaker_helpers/snapshot.rb +156 -0
- data/lib/simp/beaker_helpers/ssg.rb +383 -0
- data/lib/simp/beaker_helpers/version.rb +5 -0
- data/lib/simp/beaker_helpers/windows.rb +16 -0
- data/lib/simp/rake/beaker.rb +269 -0
- data/simp-beaker-helpers.gemspec +38 -0
- data/spec/acceptance/nodesets/default.yml +32 -0
- data/spec/acceptance/suites/default/check_puppet_version_spec.rb +23 -0
- data/spec/acceptance/suites/default/enable_fips_spec.rb +23 -0
- data/spec/acceptance/suites/default/fixture_modules_spec.rb +22 -0
- data/spec/acceptance/suites/default/install_simp_deps_repo_spec.rb +43 -0
- data/spec/acceptance/suites/default/nodesets +1 -0
- data/spec/acceptance/suites/default/pki_tests_spec.rb +55 -0
- data/spec/acceptance/suites/default/set_hieradata_on_spec.rb +33 -0
- data/spec/acceptance/suites/default/write_hieradata_to_spec.rb +33 -0
- data/spec/acceptance/suites/fips_from_fixtures/00_default_spec.rb +63 -0
- data/spec/acceptance/suites/fips_from_fixtures/metadata.yml +2 -0
- data/spec/acceptance/suites/fips_from_fixtures/nodesets +1 -0
- data/spec/acceptance/suites/offline/00_default_spec.rb +165 -0
- data/spec/acceptance/suites/offline/README +2 -0
- data/spec/acceptance/suites/offline/nodesets/default.yml +26 -0
- data/spec/acceptance/suites/puppet_collections/00_default_spec.rb +25 -0
- data/spec/acceptance/suites/puppet_collections/metadata.yml +2 -0
- data/spec/acceptance/suites/puppet_collections/nodesets/default.yml +30 -0
- data/spec/acceptance/suites/snapshot/00_snapshot_test_spec.rb +82 -0
- data/spec/acceptance/suites/snapshot/10_general_usage_spec.rb +56 -0
- data/spec/acceptance/suites/snapshot/nodesets +1 -0
- data/spec/acceptance/suites/windows/00_default_spec.rb +119 -0
- data/spec/acceptance/suites/windows/metadata.yml +2 -0
- data/spec/acceptance/suites/windows/nodesets/default.yml +33 -0
- data/spec/acceptance/suites/windows/nodesets/win2016.yml +35 -0
- data/spec/acceptance/suites/windows/nodesets/win2019.yml +34 -0
- data/spec/lib/simp/beaker_helpers_spec.rb +216 -0
- data/spec/spec_helper.rb +100 -0
- data/spec/spec_helper_acceptance.rb +25 -0
- metadata +243 -0
@@ -0,0 +1,216 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'simp/beaker_helpers'
|
3
|
+
|
4
|
+
# redefine methods used in RSpec.configure withing Simp::BeakerHelpers
|
5
|
+
def hosts; end
|
6
|
+
def activate_interfaces(hosts); end
|
7
|
+
def clear_temp_hieradata; end
|
8
|
+
|
9
|
+
class MyTestClass
|
10
|
+
class FakeHost
|
11
|
+
attr_accessor :options
|
12
|
+
def initialize(opts = {})
|
13
|
+
@options = opts
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
include Simp::BeakerHelpers
|
18
|
+
|
19
|
+
attr_accessor :host
|
20
|
+
|
21
|
+
def initialize
|
22
|
+
@host = FakeHost.new
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe 'Simp::BeakerHelpers' do
|
27
|
+
before :each do
|
28
|
+
@helper = MyTestClass.new
|
29
|
+
end
|
30
|
+
|
31
|
+
let(:gem_search_results) {
|
32
|
+
# subset of results, but still exercises code
|
33
|
+
"puppet (5.5.1 ruby universal-darwin x64-mingw32 x86-mingw32, 5.5.0 ruby universal-darwin x64-mingw32 x86-mingw32, 5.4.0 ruby universal-darwin x64-mingw32 x86-mingw32, 5.3.6 ruby universal-darwin x64-mingw32 x86-mingw32, 5.3.5 ruby universal-darwin x64-mingw32 x86-mingw32, 5.3.4 ruby universal-darwin x64-mingw32 x86-mingw32, 5.3.3 ruby universal-darwin x64-mingw32 x86-mingw32, 5.3.2 ruby universal-darwin x64-mingw32 x86-mingw32, 5.3.1 ruby universal-darwin x64-mingw32 x86-mingw32, 5.2.0 ruby universal-darwin x64-mingw32 x86-mingw32, 5.1.0 ruby universal-darwin x64-mingw32 x86-mingw32, 5.0.1 ruby universal-darwin x64-mingw32 x86-mingw32, 5.0.0 ruby universal-darwin x64-mingw32 x86-mingw32, 4.10.11 ruby universal-darwin x64-mingw32 x86-mingw32, 4.10.10 ruby universal-darwin x64-mingw32 x86-mingw32, 4.10.9 ruby universal-darwin x64-mingw32 x86-mingw32, 4.10.8 ruby universal-darwin x64-mingw32 x86-mingw32, 4.10.7 ruby universal-darwin x64-mingw32 x86-mingw32, 4.10.6 ruby universal-darwin x64-mingw32 x86-mingw32, 4.10.5 ruby universal-darwin x64-mingw32 x86-mingw32, 4.10.4 ruby universal-darwin x64-mingw32 x86-mingw32, 4.10.1 ruby universal-darwin x64-mingw32 x86-mingw32, 4.10.0 ruby universal-darwin x64-mingw32 x86-mingw32, 4.9.4 ruby universal-darwin x64-mingw32 x86-mingw32, 4.9.3 ruby universal-darwin x64-mingw32 x86-mingw32, 4.9.2 ruby universal-darwin x64-mingw32 x86-mingw32, 4.9.1 ruby universal-darwin x64-mingw32 x86-mingw32, 4.9.0 ruby universal-darwin x64-mingw32 x86-mingw32, 4.8.2 ruby universal-darwin x64-mingw32 x86-mingw32, 4.8.1 ruby universal-darwin x64-mingw32 x86-mingw32, 4.8.0 ruby universal-darwin x64-mingw32 x86-mingw32)\n"
|
34
|
+
}
|
35
|
+
|
36
|
+
context '#latest_puppet_agent_version_for' do
|
37
|
+
context 'using table' do
|
38
|
+
it 'maps exact Puppet version' do
|
39
|
+
expect( @helper.latest_puppet_agent_version_for('4.10.4') ).to eq '1.10.4'
|
40
|
+
end
|
41
|
+
|
42
|
+
# remaining tests are only for a sampling of version specifictions with
|
43
|
+
# operators, because we are really only testing that the version specification
|
44
|
+
# is proper;ly handed off to Gem::Requirement(), not that Gem::Requirement works.
|
45
|
+
it "maps to appropriate Puppet version when '=' operator specified in version" do
|
46
|
+
expect( @helper.latest_puppet_agent_version_for('= 4.8') ).to eq '1.8.0'
|
47
|
+
end
|
48
|
+
|
49
|
+
it "maps to appropriate Puppet version when '~>' operator specified in version" do
|
50
|
+
expect( @helper.latest_puppet_agent_version_for('~> 4.8.0') ).to eq '1.8.3'
|
51
|
+
end
|
52
|
+
|
53
|
+
it "maps to appropriate Puppet version when '<' operator specified in version" do
|
54
|
+
expect( @helper.latest_puppet_agent_version_for('< 4.9') ).to match /1.8.3/
|
55
|
+
end
|
56
|
+
|
57
|
+
it "maps to appropriate Puppet version when comma-separated operators specified in version" do
|
58
|
+
expect( @helper.latest_puppet_agent_version_for('>= 4.7, < 4.9') ).to match /1.8.3/
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
context 'using gem lookup' do
|
63
|
+
it 'maps exact Puppet version' do
|
64
|
+
allow(@helper).to receive(:`).with('gem search -ra -e puppet').and_return(gem_search_results)
|
65
|
+
expect( @helper.latest_puppet_agent_version_for('5.3.1') ).to eq '5.3.1'
|
66
|
+
end
|
67
|
+
|
68
|
+
# remaining tests are only for a sampling of version specifictions with
|
69
|
+
# operators, because we are really only testing that the version specification
|
70
|
+
# is proper;ly handed off to Gem::Requirement(), not that Gem::Requirement works.
|
71
|
+
it "maps to appropriate Puppet version when '=' operator specified in version" do
|
72
|
+
allow(@helper).to receive(:`).with('gem search -ra -e puppet').and_return(gem_search_results)
|
73
|
+
expect( @helper.latest_puppet_agent_version_for('= 5.5') ).to eq '5.5.0'
|
74
|
+
end
|
75
|
+
|
76
|
+
it "maps to appropriate Puppet version when '~>' operator specified in version" do
|
77
|
+
allow(@helper).to receive(:`).with('gem search -ra -e puppet').and_return(gem_search_results)
|
78
|
+
expect( @helper.latest_puppet_agent_version_for('~> 5.3.0') ).to eq '5.3.6'
|
79
|
+
end
|
80
|
+
|
81
|
+
# this logic won't work properly without code changes that just aren't worth it because
|
82
|
+
# Puppet 4 is MD soon....
|
83
|
+
# it "maps to appropriate Puppet version when '<' operator specified in version" do
|
84
|
+
# pending 'fails because matches 4.x table'
|
85
|
+
# allow(@helper).to receive(:`).with('gem search -ra -e puppet').and_return(gem_search_results)
|
86
|
+
# expect( @helper.latest_puppet_agent_version_for('< 5.5') ).to match /5.4.0/
|
87
|
+
# end
|
88
|
+
|
89
|
+
it "maps to appropriate Puppet version when comma-separated operators specified in version" do
|
90
|
+
allow(@helper).to receive(:`).with('gem search -ra -e puppet').and_return(gem_search_results)
|
91
|
+
expect( @helper.latest_puppet_agent_version_for('>= 5, < 5.5') ).to match /5.4.0/
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
context '#get_puppet_install_info' do
|
97
|
+
after (:each) do
|
98
|
+
ENV['BEAKER_PUPPET_AGENT_VERSION'] = nil
|
99
|
+
ENV['PUPPET_INSTALL_VERSION'] = nil
|
100
|
+
ENV['PUPPET_VERSION'] = nil
|
101
|
+
ENV['BEAKER_PUPPET_COLLECTION'] = nil
|
102
|
+
ENV['PUPPET_INSTALL_TYPE'] = nil
|
103
|
+
end
|
104
|
+
|
105
|
+
it 'uses defaults when no environment variables are set' do
|
106
|
+
expect( @helper.get_puppet_install_info[:puppet_install_version] ).to match(/^5\./)
|
107
|
+
expect( @helper.get_puppet_install_info[:puppet_collection] ).to eq('puppet5')
|
108
|
+
expect( @helper.get_puppet_install_info[:puppet_install_type] ).to eq('agent')
|
109
|
+
end
|
110
|
+
|
111
|
+
it 'extracts info from PUPPET_INSTALL_VERSION for Puppet 4' do
|
112
|
+
ENV['PUPPET_INSTALL_VERSION']= '4.10.5'
|
113
|
+
expected = {
|
114
|
+
:puppet_install_version => '1.10.5',
|
115
|
+
:puppet_collection => nil,
|
116
|
+
:puppet_install_type => 'agent'
|
117
|
+
}
|
118
|
+
expect( @helper.get_puppet_install_info ).to eq expected
|
119
|
+
end
|
120
|
+
|
121
|
+
it 'extracts info from PUPPET_INSTALL_VERSION for Puppet 5' do
|
122
|
+
allow(@helper).to receive(:`).with('gem search -ra -e puppet').and_return(gem_search_results)
|
123
|
+
ENV['PUPPET_INSTALL_VERSION']= '5.5.0'
|
124
|
+
expected = {
|
125
|
+
:puppet_install_version => '5.5.0',
|
126
|
+
:puppet_collection => 'puppet5',
|
127
|
+
:puppet_install_type => 'agent'
|
128
|
+
}
|
129
|
+
expect( @helper.get_puppet_install_info ).to eq expected
|
130
|
+
end
|
131
|
+
|
132
|
+
it 'extracts info from PUPPET_INSTALL_VERSION even when BEAKER_PUPPET_COLLECTION is set' do
|
133
|
+
allow(@helper).to receive(:`).with('gem search -ra -e puppet').and_return(gem_search_results)
|
134
|
+
ENV['PUPPET_INSTALL_VERSION']= '5.5.0'
|
135
|
+
ENV['BEAKER_PUPPET_COLLECTION']= 'puppet6'
|
136
|
+
expected = {
|
137
|
+
:puppet_install_version => '5.5.0',
|
138
|
+
:puppet_collection => 'puppet5',
|
139
|
+
:puppet_install_type => 'agent'
|
140
|
+
}
|
141
|
+
expect( @helper.get_puppet_install_info ).to eq expected
|
142
|
+
end
|
143
|
+
|
144
|
+
it 'extracts info from PUPPET_INSTALL_VERSION even when host puppet_collection option is set' do
|
145
|
+
allow(@helper).to receive(:`).with('gem search -ra -e puppet').and_return(gem_search_results)
|
146
|
+
ENV['PUPPET_INSTALL_VERSION']= '5.5.0'
|
147
|
+
@helper.host.options = {'puppet_collection' => 'puppet6'}
|
148
|
+
expected = {
|
149
|
+
:puppet_install_version => '5.5.0',
|
150
|
+
:puppet_collection => 'puppet5',
|
151
|
+
:puppet_install_type => 'agent'
|
152
|
+
}
|
153
|
+
expect( @helper.get_puppet_install_info ).to eq expected
|
154
|
+
end
|
155
|
+
|
156
|
+
it 'extracts info from BEAKER_PUPPET_AGENT_VERSION' do
|
157
|
+
ENV['BEAKER_PUPPET_AGENT_VERSION']= '4.10.5'
|
158
|
+
expected = {
|
159
|
+
:puppet_install_version => '1.10.5',
|
160
|
+
:puppet_collection => nil,
|
161
|
+
:puppet_install_type => 'agent'
|
162
|
+
}
|
163
|
+
expect( @helper.get_puppet_install_info ).to eq expected
|
164
|
+
end
|
165
|
+
|
166
|
+
it 'extracts info from PUPPET_VERSION' do
|
167
|
+
ENV['PUPPET_VERSION']= '4.10.5'
|
168
|
+
expected = {
|
169
|
+
:puppet_install_version => '1.10.5',
|
170
|
+
:puppet_collection => nil,
|
171
|
+
:puppet_install_type => 'agent'
|
172
|
+
}
|
173
|
+
expect( @helper.get_puppet_install_info ).to eq expected
|
174
|
+
end
|
175
|
+
|
176
|
+
it 'extracts info from BEAKER_PUPPET_COLLECTION' do
|
177
|
+
allow(@helper).to receive(:`).with('gem search -ra -e puppet').and_return(gem_search_results)
|
178
|
+
ENV['BEAKER_PUPPET_COLLECTION']= 'puppet5'
|
179
|
+
expected = {
|
180
|
+
:puppet_install_version => '5.5.1',
|
181
|
+
:puppet_collection => 'puppet5',
|
182
|
+
:puppet_install_type => 'agent'
|
183
|
+
}
|
184
|
+
expect( @helper.get_puppet_install_info ).to eq expected
|
185
|
+
end
|
186
|
+
|
187
|
+
it 'extracts info from BEAKER_PUPPET_COLLECTION' do
|
188
|
+
allow(@helper).to receive(:`).with('gem search -ra -e puppet').and_return(gem_search_results)
|
189
|
+
@helper.host.options = {'puppet_collection' => 'puppet5'}
|
190
|
+
expected = {
|
191
|
+
:puppet_install_version => '5.5.1',
|
192
|
+
:puppet_collection => 'puppet5',
|
193
|
+
:puppet_install_type => 'agent'
|
194
|
+
}
|
195
|
+
expect( @helper.get_puppet_install_info ).to eq expected
|
196
|
+
end
|
197
|
+
|
198
|
+
it 'extracts info from PUPPET_INSTALL_TYPE' do
|
199
|
+
ENV['PUPPET_INSTALL_TYPE'] = 'pe'
|
200
|
+
|
201
|
+
expect( @helper.get_puppet_install_info[:puppet_collection] ).to eq('puppet5')
|
202
|
+
expect( @helper.get_puppet_install_info[:puppet_install_type] ).to eq('pe')
|
203
|
+
expect( @helper.get_puppet_install_info[:puppet_install_version] ).to match(/^5\./)
|
204
|
+
end
|
205
|
+
|
206
|
+
it 'fails when BEAKER_PUPPET_COLLECTION is invalid' do
|
207
|
+
ENV['BEAKER_PUPPET_COLLECTION'] = 'PUPPET5'
|
208
|
+
expect{ @helper.get_puppet_install_info }.to raise_error(/Error: Puppet Collection 'PUPPET5' must match/)
|
209
|
+
end
|
210
|
+
|
211
|
+
it 'fails when host options puppet_collection is invalid' do
|
212
|
+
@helper.host.options = {'puppet_collection' => 'PUPPET5'}
|
213
|
+
expect{ @helper.get_puppet_install_info }.to raise_error(/Error: Puppet Collection 'PUPPET5' must match/)
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
4
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
5
|
+
# files.
|
6
|
+
#
|
7
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
8
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
9
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
10
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
11
|
+
# a separate helper file that requires the additional dependencies and performs
|
12
|
+
# the additional setup, and require it from the spec files that actually need
|
13
|
+
# it.
|
14
|
+
#
|
15
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
16
|
+
RSpec.configure do |config|
|
17
|
+
# rspec-expectations config goes here. You can use an alternate
|
18
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
19
|
+
# assertions if you prefer.
|
20
|
+
config.expect_with :rspec do |expectations|
|
21
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
22
|
+
# and `failure_message` of custom matchers include text for helper methods
|
23
|
+
# defined using `chain`, e.g.:
|
24
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
25
|
+
# # => "be bigger than 2 and smaller than 4"
|
26
|
+
# ...rather than:
|
27
|
+
# # => "be bigger than 2"
|
28
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
29
|
+
end
|
30
|
+
|
31
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
32
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
33
|
+
config.mock_with :rspec do |mocks|
|
34
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
35
|
+
# a real object. This is generally recommended, and will default to
|
36
|
+
# `true` in RSpec 4.
|
37
|
+
mocks.verify_partial_doubles = true
|
38
|
+
end
|
39
|
+
|
40
|
+
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
41
|
+
# have no way to turn it off -- the option exists only for backwards
|
42
|
+
# compatibility in RSpec 3). It causes shared context metadata to be
|
43
|
+
# inherited by the metadata hash of host groups and examples, rather than
|
44
|
+
# triggering implicit auto-inclusion in groups with matching metadata.
|
45
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
46
|
+
|
47
|
+
# The settings below are suggested to provide a good initial experience
|
48
|
+
# with RSpec, but feel free to customize to your heart's content.
|
49
|
+
=begin
|
50
|
+
# This allows you to limit a spec run to individual examples or groups
|
51
|
+
# you care about by tagging them with `:focus` metadata. When nothing
|
52
|
+
# is tagged with `:focus`, all examples get run. RSpec also provides
|
53
|
+
# aliases for `it`, `describe`, and `context` that include `:focus`
|
54
|
+
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
|
55
|
+
config.filter_run_when_matching :focus
|
56
|
+
|
57
|
+
# Allows RSpec to persist some state between runs in order to support
|
58
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
59
|
+
# you configure your source control system to ignore this file.
|
60
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
61
|
+
|
62
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
63
|
+
# recommended. For more details, see:
|
64
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
65
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
66
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
67
|
+
config.disable_monkey_patching!
|
68
|
+
|
69
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
70
|
+
# be too noisy due to issues in dependencies.
|
71
|
+
config.warnings = true
|
72
|
+
|
73
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
74
|
+
# file, and it's useful to allow more verbose output when running an
|
75
|
+
# individual spec file.
|
76
|
+
if config.files_to_run.one?
|
77
|
+
# Use the documentation formatter for detailed output,
|
78
|
+
# unless a formatter has already been configured
|
79
|
+
# (e.g. via a command-line flag).
|
80
|
+
config.default_formatter = "doc"
|
81
|
+
end
|
82
|
+
|
83
|
+
# Print the 10 slowest examples and example groups at the
|
84
|
+
# end of the spec run, to help surface which specs are running
|
85
|
+
# particularly slow.
|
86
|
+
config.profile_examples = 10
|
87
|
+
|
88
|
+
# Run specs in random order to surface order dependencies. If you find an
|
89
|
+
# order dependency and want to debug it, you can fix the order by providing
|
90
|
+
# the seed, which is printed after each run.
|
91
|
+
# --seed 1234
|
92
|
+
config.order = :random
|
93
|
+
|
94
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
95
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
96
|
+
# test failures related to randomization by passing the same `--seed` value
|
97
|
+
# as the one that triggered the failure.
|
98
|
+
Kernel.srand config.seed
|
99
|
+
=end
|
100
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'beaker-rspec'
|
2
|
+
require 'tmpdir'
|
3
|
+
require 'yaml'
|
4
|
+
require 'simp/beaker_helpers'
|
5
|
+
include Simp::BeakerHelpers
|
6
|
+
|
7
|
+
unless ENV['BEAKER_provision'] == 'no'
|
8
|
+
hosts.each do |host|
|
9
|
+
# Install Puppet
|
10
|
+
if host.is_pe?
|
11
|
+
install_pe
|
12
|
+
else
|
13
|
+
install_puppet
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
|
19
|
+
RSpec.configure do |c|
|
20
|
+
# ensure that environment OS is ready on each host
|
21
|
+
fix_errata_on(hosts)
|
22
|
+
|
23
|
+
# Readable test descriptions
|
24
|
+
c.formatter = :documentation
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,243 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: simp-beaker-helpers
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.18.8
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Chris Tessmer
|
8
|
+
- Trevor Vaughan
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2020-07-21 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: beaker
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 4.17.0
|
21
|
+
- - "<"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 5.0.0
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: 4.17.0
|
31
|
+
- - "<"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 5.0.0
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: beaker-rspec
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '6.2'
|
41
|
+
type: :runtime
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '6.2'
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: beaker-puppet
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.18.14
|
55
|
+
- - "<"
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 2.0.0
|
58
|
+
type: :runtime
|
59
|
+
prerelease: false
|
60
|
+
version_requirements: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 1.18.14
|
65
|
+
- - "<"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 2.0.0
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: beaker-docker
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0.3'
|
75
|
+
type: :runtime
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0.3'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: beaker-vagrant
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 0.6.4
|
89
|
+
- - "<"
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: 2.0.0
|
92
|
+
type: :runtime
|
93
|
+
prerelease: false
|
94
|
+
version_requirements: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 0.6.4
|
99
|
+
- - "<"
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 2.0.0
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: beaker-puppet_install_helper
|
104
|
+
requirement: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - "~>"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0.9'
|
109
|
+
type: :runtime
|
110
|
+
prerelease: false
|
111
|
+
version_requirements: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - "~>"
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0.9'
|
116
|
+
- !ruby/object:Gem::Dependency
|
117
|
+
name: highline
|
118
|
+
requirement: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - "~>"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '2.0'
|
123
|
+
type: :runtime
|
124
|
+
prerelease: false
|
125
|
+
version_requirements: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - "~>"
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '2.0'
|
130
|
+
- !ruby/object:Gem::Dependency
|
131
|
+
name: nokogiri
|
132
|
+
requirement: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - "~>"
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '1.8'
|
137
|
+
type: :runtime
|
138
|
+
prerelease: false
|
139
|
+
version_requirements: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - "~>"
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '1.8'
|
144
|
+
- !ruby/object:Gem::Dependency
|
145
|
+
name: net-telnet
|
146
|
+
requirement: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - "~>"
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: 0.1.1
|
151
|
+
type: :runtime
|
152
|
+
prerelease: false
|
153
|
+
version_requirements: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - "~>"
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: 0.1.1
|
158
|
+
description: " Beaker helper methods to help scaffold SIMP acceptance tests\n"
|
159
|
+
email: simp@simp-project.org
|
160
|
+
executables: []
|
161
|
+
extensions: []
|
162
|
+
extra_rdoc_files: []
|
163
|
+
files:
|
164
|
+
- ".fixtures.yml"
|
165
|
+
- ".gitignore"
|
166
|
+
- ".gitlab-ci.yml"
|
167
|
+
- ".rspec"
|
168
|
+
- ".rubocop.yml"
|
169
|
+
- ".travis.yml"
|
170
|
+
- CHANGELOG.md
|
171
|
+
- Gemfile
|
172
|
+
- LICENSE
|
173
|
+
- README.md
|
174
|
+
- Rakefile
|
175
|
+
- files/pki/clean.sh
|
176
|
+
- files/pki/make.sh
|
177
|
+
- files/pki/template_ca.cnf
|
178
|
+
- files/pki/template_host.cnf
|
179
|
+
- files/puppet-agent-versions.yaml
|
180
|
+
- lib/simp/beaker_helpers.rb
|
181
|
+
- lib/simp/beaker_helpers/constants.rb
|
182
|
+
- lib/simp/beaker_helpers/inspec.rb
|
183
|
+
- lib/simp/beaker_helpers/snapshot.rb
|
184
|
+
- lib/simp/beaker_helpers/ssg.rb
|
185
|
+
- lib/simp/beaker_helpers/version.rb
|
186
|
+
- lib/simp/beaker_helpers/windows.rb
|
187
|
+
- lib/simp/rake/beaker.rb
|
188
|
+
- simp-beaker-helpers.gemspec
|
189
|
+
- spec/acceptance/nodesets/default.yml
|
190
|
+
- spec/acceptance/suites/default/check_puppet_version_spec.rb
|
191
|
+
- spec/acceptance/suites/default/enable_fips_spec.rb
|
192
|
+
- spec/acceptance/suites/default/fixture_modules_spec.rb
|
193
|
+
- spec/acceptance/suites/default/install_simp_deps_repo_spec.rb
|
194
|
+
- spec/acceptance/suites/default/nodesets
|
195
|
+
- spec/acceptance/suites/default/pki_tests_spec.rb
|
196
|
+
- spec/acceptance/suites/default/set_hieradata_on_spec.rb
|
197
|
+
- spec/acceptance/suites/default/write_hieradata_to_spec.rb
|
198
|
+
- spec/acceptance/suites/fips_from_fixtures/00_default_spec.rb
|
199
|
+
- spec/acceptance/suites/fips_from_fixtures/metadata.yml
|
200
|
+
- spec/acceptance/suites/fips_from_fixtures/nodesets
|
201
|
+
- spec/acceptance/suites/offline/00_default_spec.rb
|
202
|
+
- spec/acceptance/suites/offline/README
|
203
|
+
- spec/acceptance/suites/offline/nodesets/default.yml
|
204
|
+
- spec/acceptance/suites/puppet_collections/00_default_spec.rb
|
205
|
+
- spec/acceptance/suites/puppet_collections/metadata.yml
|
206
|
+
- spec/acceptance/suites/puppet_collections/nodesets/default.yml
|
207
|
+
- spec/acceptance/suites/snapshot/00_snapshot_test_spec.rb
|
208
|
+
- spec/acceptance/suites/snapshot/10_general_usage_spec.rb
|
209
|
+
- spec/acceptance/suites/snapshot/nodesets
|
210
|
+
- spec/acceptance/suites/windows/00_default_spec.rb
|
211
|
+
- spec/acceptance/suites/windows/metadata.yml
|
212
|
+
- spec/acceptance/suites/windows/nodesets/default.yml
|
213
|
+
- spec/acceptance/suites/windows/nodesets/win2016.yml
|
214
|
+
- spec/acceptance/suites/windows/nodesets/win2019.yml
|
215
|
+
- spec/lib/simp/beaker_helpers_spec.rb
|
216
|
+
- spec/spec_helper.rb
|
217
|
+
- spec/spec_helper_acceptance.rb
|
218
|
+
homepage: https://github.com/simp/rubygem-simp-beaker-helpers
|
219
|
+
licenses:
|
220
|
+
- Apache-2.0
|
221
|
+
metadata:
|
222
|
+
issue_tracker: https://simp-project.atlassian.net
|
223
|
+
post_install_message:
|
224
|
+
rdoc_options: []
|
225
|
+
require_paths:
|
226
|
+
- lib
|
227
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
228
|
+
requirements:
|
229
|
+
- - ">="
|
230
|
+
- !ruby/object:Gem::Version
|
231
|
+
version: '0'
|
232
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - ">="
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0'
|
237
|
+
requirements: []
|
238
|
+
rubyforge_project:
|
239
|
+
rubygems_version: 2.7.7
|
240
|
+
signing_key:
|
241
|
+
specification_version: 4
|
242
|
+
summary: beaker helper methods for SIMP
|
243
|
+
test_files: []
|