simp-beaker-helpers 1.14.1 → 1.14.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06c5bb0aadedabbd7c93aab3b66123af0ee0c31c20420e15d52f8e1a16b86601
4
- data.tar.gz: 23d115e02eb74f7aeecda877220275d1ae43951cd6bc75d3584e6e8bc64eeab9
3
+ metadata.gz: 2f0c1802b035c9aab8eb25b91d2434e11d3c755be99e51fe281931e369f23cfc
4
+ data.tar.gz: 8453b9c5d98d067103f977f45d5e2f06f7d265c38ecbbfdab3ddbc47fbe19e95
5
5
  SHA512:
6
- metadata.gz: 2c855652d1b54877ec82b9b979c2b9dec45e8ccb6e303d9375e8b8440552b6066b9009c85885c62043623408e31c7090310279bd51bba29223fdf279154b04a1
7
- data.tar.gz: 9c8dd37796df29ec3e1d40b5d91459ae585b997cbffa9aaba4011069c999d65f81f91b99bec34e6956ef699c6e65905073173139a8ab35db361aab8fb223f2a1
6
+ metadata.gz: a39140d24b4e7fe16e62c9e7220801670349082ef539dc62eabc381fb8cc902e751c340cff05b230127b1272a35d7bc909b4eeb3af23b0264a2df1ee8d7cd7b8
7
+ data.tar.gz: bcff7a3c524f8f753da48848562cd6d1b9ea0994a737058cd2c846dbe2081408c807dfd14b00dea77afa8a8f720f4c2f5726a18a521f715101584b62aa7f283f
data/.gitlab-ci.yml CHANGED
@@ -98,21 +98,6 @@ default:
98
98
  - beaker
99
99
  <<: *cache_bundler
100
100
  <<: *setup_bundler_env
101
- variables:
102
- PUPPET_VERSION: '~> 4.10.10'
103
- script:
104
- - bundle exec rake spec_clean
105
- - bundle exec rake beaker:suites[default]
106
-
107
- default-puppet5:
108
- stage: acceptance
109
- tags:
110
- - beaker
111
- <<: *cache_bundler
112
- <<: *setup_bundler_env
113
- variables:
114
- PUPPET_VERSION: '~> 5.3'
115
- BEAKER_PUPPET_COLLECTION: 'puppet5'
116
101
  script:
117
102
  - bundle exec rake spec_clean
118
103
  - bundle exec rake beaker:suites[default]
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ### 1.14.2 / 2019-05-16
2
+ * Move the minimum supported puppet version to Puppet 5 since Puppet 4 has been
3
+ removed from the download servers completely. Beaker may re-add support for
4
+ the new location so not removing the mappings at this time.
5
+ * Fixed a bug where a hash item was incorrect and not properly passing along
6
+ configuration items.
7
+
1
8
  ### 1.14.1 / 2019-04-15
2
9
  * Handle license acceptance option needed for new versions of inspec.
3
10
 
@@ -19,7 +19,7 @@ module Simp::BeakerHelpers
19
19
  #
20
20
  # This is done so that we know if some new thing that we're using breaks the
21
21
  # oldest system that we support.
22
- DEFAULT_PUPPET_AGENT_VERSION = '1.10.4'
22
+ DEFAULT_PUPPET_AGENT_VERSION = '~> 5.0'
23
23
 
24
24
  # We can't cache this because it may change during a run
25
25
  def fips_enabled(sut)
@@ -889,7 +889,7 @@ done
889
889
  return result
890
890
  end
891
891
 
892
- # returns hash with :puppet_install_version, :beaker_puppet_collection,
892
+ # returns hash with :puppet_install_version, :puppet_collection,
893
893
  # and :puppet_install_type keys determined from environment variables,
894
894
  # host settings, and/or defaults
895
895
  #
@@ -916,7 +916,7 @@ done
916
916
  raise("Error: Puppet Collection '#{puppet_collection}' must match /puppet(\\d+)/")
917
917
  end
918
918
  else
919
- puppet_agent_version = DEFAULT_PUPPET_AGENT_VERSION
919
+ puppet_agent_version = latest_puppet_agent_version_for(DEFAULT_PUPPET_AGENT_VERSION)
920
920
  end
921
921
  end
922
922
 
@@ -925,9 +925,10 @@ done
925
925
  puppet_collection = "puppet#{base_version}" if base_version >= 5
926
926
  end
927
927
 
928
- { :puppet_install_version => puppet_agent_version,
929
- :beaker_puppet_collection => puppet_collection,
930
- :puppet_install_type => ENV.fetch('PUPPET_INSTALL_TYPE', 'agent')
928
+ {
929
+ :puppet_install_version => puppet_agent_version,
930
+ :puppet_collection => puppet_collection,
931
+ :puppet_install_type => ENV.fetch('PUPPET_INSTALL_TYPE', 'agent')
931
932
  }
932
933
  end
933
934
 
@@ -938,7 +939,7 @@ done
938
939
 
939
940
  # In case Beaker needs this info internally
940
941
  ENV['PUPPET_INSTALL_VERSION'] = install_info[:puppet_install_version]
941
- unless install_info[:puppet_collection].nil?
942
+ if install_info[:puppet_collection]
942
943
  ENV['BEAKER_PUPPET_COLLECTION'] = install_info[:puppet_collection]
943
944
  end
944
945
 
@@ -1,5 +1,5 @@
1
1
  module Simp; end
2
2
 
3
3
  module Simp::BeakerHelpers
4
- VERSION = '1.14.1'
4
+ VERSION = '1.14.2'
5
5
  end
@@ -14,8 +14,8 @@ hosts.each do |host|
14
14
  expect(client_puppet_version.split('.').first).to eq(puppet_collection_version)
15
15
  end
16
16
  else
17
- it 'should not be running puppet 5+' do
18
- expect(client_puppet_version.split('.').first).to be < '5'
17
+ it 'should not be running puppet 5' do
18
+ expect(client_puppet_version.split('.').first).to eq '5'
19
19
  end
20
20
  end
21
21
  end
@@ -103,20 +103,17 @@ describe 'Simp::BeakerHelpers' do
103
103
  end
104
104
 
105
105
  it 'uses defaults when no environment variables are set' do
106
- expected = {
107
- :puppet_install_version => Simp::BeakerHelpers::DEFAULT_PUPPET_AGENT_VERSION,
108
- :beaker_puppet_collection => nil,
109
- :puppet_install_type => 'agent'
110
- }
111
- expect( @helper.get_puppet_install_info ).to eq expected
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')
112
109
  end
113
110
 
114
111
  it 'extracts info from PUPPET_INSTALL_VERSION for Puppet 4' do
115
112
  ENV['PUPPET_INSTALL_VERSION']= '4.10.5'
116
113
  expected = {
117
- :puppet_install_version => '1.10.5',
118
- :beaker_puppet_collection => nil,
119
- :puppet_install_type => 'agent'
114
+ :puppet_install_version => '1.10.5',
115
+ :puppet_collection => nil,
116
+ :puppet_install_type => 'agent'
120
117
  }
121
118
  expect( @helper.get_puppet_install_info ).to eq expected
122
119
  end
@@ -125,9 +122,9 @@ describe 'Simp::BeakerHelpers' do
125
122
  allow(@helper).to receive(:`).with('gem search -ra -e puppet').and_return(gem_search_results)
126
123
  ENV['PUPPET_INSTALL_VERSION']= '5.5.0'
127
124
  expected = {
128
- :puppet_install_version => '5.5.0',
129
- :beaker_puppet_collection => 'puppet5',
130
- :puppet_install_type => 'agent'
125
+ :puppet_install_version => '5.5.0',
126
+ :puppet_collection => 'puppet5',
127
+ :puppet_install_type => 'agent'
131
128
  }
132
129
  expect( @helper.get_puppet_install_info ).to eq expected
133
130
  end
@@ -137,9 +134,9 @@ describe 'Simp::BeakerHelpers' do
137
134
  ENV['PUPPET_INSTALL_VERSION']= '5.5.0'
138
135
  ENV['BEAKER_PUPPET_COLLECTION']= 'puppet6'
139
136
  expected = {
140
- :puppet_install_version => '5.5.0',
141
- :beaker_puppet_collection => 'puppet5',
142
- :puppet_install_type => 'agent'
137
+ :puppet_install_version => '5.5.0',
138
+ :puppet_collection => 'puppet5',
139
+ :puppet_install_type => 'agent'
143
140
  }
144
141
  expect( @helper.get_puppet_install_info ).to eq expected
145
142
  end
@@ -149,9 +146,9 @@ describe 'Simp::BeakerHelpers' do
149
146
  ENV['PUPPET_INSTALL_VERSION']= '5.5.0'
150
147
  @helper.host.options = {'puppet_collection' => 'puppet6'}
151
148
  expected = {
152
- :puppet_install_version => '5.5.0',
153
- :beaker_puppet_collection => 'puppet5',
154
- :puppet_install_type => 'agent'
149
+ :puppet_install_version => '5.5.0',
150
+ :puppet_collection => 'puppet5',
151
+ :puppet_install_type => 'agent'
155
152
  }
156
153
  expect( @helper.get_puppet_install_info ).to eq expected
157
154
  end
@@ -159,9 +156,9 @@ describe 'Simp::BeakerHelpers' do
159
156
  it 'extracts info from BEAKER_PUPPET_AGENT_VERSION' do
160
157
  ENV['BEAKER_PUPPET_AGENT_VERSION']= '4.10.5'
161
158
  expected = {
162
- :puppet_install_version => '1.10.5',
163
- :beaker_puppet_collection => nil,
164
- :puppet_install_type => 'agent'
159
+ :puppet_install_version => '1.10.5',
160
+ :puppet_collection => nil,
161
+ :puppet_install_type => 'agent'
165
162
  }
166
163
  expect( @helper.get_puppet_install_info ).to eq expected
167
164
  end
@@ -169,9 +166,9 @@ describe 'Simp::BeakerHelpers' do
169
166
  it 'extracts info from PUPPET_VERSION' do
170
167
  ENV['PUPPET_VERSION']= '4.10.5'
171
168
  expected = {
172
- :puppet_install_version => '1.10.5',
173
- :beaker_puppet_collection => nil,
174
- :puppet_install_type => 'agent'
169
+ :puppet_install_version => '1.10.5',
170
+ :puppet_collection => nil,
171
+ :puppet_install_type => 'agent'
175
172
  }
176
173
  expect( @helper.get_puppet_install_info ).to eq expected
177
174
  end
@@ -180,9 +177,9 @@ describe 'Simp::BeakerHelpers' do
180
177
  allow(@helper).to receive(:`).with('gem search -ra -e puppet').and_return(gem_search_results)
181
178
  ENV['BEAKER_PUPPET_COLLECTION']= 'puppet5'
182
179
  expected = {
183
- :puppet_install_version => '5.5.1',
184
- :beaker_puppet_collection => 'puppet5',
185
- :puppet_install_type => 'agent'
180
+ :puppet_install_version => '5.5.1',
181
+ :puppet_collection => 'puppet5',
182
+ :puppet_install_type => 'agent'
186
183
  }
187
184
  expect( @helper.get_puppet_install_info ).to eq expected
188
185
  end
@@ -191,21 +188,19 @@ describe 'Simp::BeakerHelpers' do
191
188
  allow(@helper).to receive(:`).with('gem search -ra -e puppet').and_return(gem_search_results)
192
189
  @helper.host.options = {'puppet_collection' => 'puppet5'}
193
190
  expected = {
194
- :puppet_install_version => '5.5.1',
195
- :beaker_puppet_collection => 'puppet5',
196
- :puppet_install_type => 'agent'
191
+ :puppet_install_version => '5.5.1',
192
+ :puppet_collection => 'puppet5',
193
+ :puppet_install_type => 'agent'
197
194
  }
198
195
  expect( @helper.get_puppet_install_info ).to eq expected
199
196
  end
200
197
 
201
198
  it 'extracts info from PUPPET_INSTALL_TYPE' do
202
199
  ENV['PUPPET_INSTALL_TYPE'] = 'pe'
203
- expected = {
204
- :puppet_install_version => Simp::BeakerHelpers::DEFAULT_PUPPET_AGENT_VERSION,
205
- :beaker_puppet_collection => nil,
206
- :puppet_install_type => 'pe'
207
- }
208
- expect( @helper.get_puppet_install_info ).to eq expected
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\./)
209
204
  end
210
205
 
211
206
  it 'fails when BEAKER_PUPPET_COLLECTION is invalid' do
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.14.1
4
+ version: 1.14.2
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: 2019-04-15 00:00:00.000000000 Z
12
+ date: 2019-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: beaker