beaker-pe 2.0.6 → 2.1.0

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
  SHA1:
3
- metadata.gz: 4718c6001818ced559b751f2cd3947e7c90769d4
4
- data.tar.gz: 2b7554400d49d64a35715438a98949d96efcc31b
3
+ metadata.gz: d9e5696f082986323b3be94c1d55a307337303b2
4
+ data.tar.gz: cfb93afdba7c5953300918851534d5543e16e076
5
5
  SHA512:
6
- metadata.gz: 85e80e262f46bf1a448b3288de9c19252aefd99d2210a77890e7285021894d334fe2dd21f9820d0cd6b9d9e4957468c6d44154c4589a746fbcfd184479d9fb33
7
- data.tar.gz: 6431e17d5bf64dd50fbb385c1229346ce69f3bee5788bde0df787c05cbe2a2f85cf662288f59fc490064e44d1ba9601c09b9a9c6aa891552f0950f13ba3d0ddd
6
+ metadata.gz: 30b7296a2d818d90f771e6984c36496e715d5299df4643be614ba85db7f786915b3cf394d81202f66787d9b825996aa2802034a72602f98efd8d7bedc32c1b4f
7
+ data.tar.gz: 9f34ccf92c3d0d8150f8ceaf757177586a5ca8da0be15f5b532d9c2077180ea8e8004d8d88ef0bf860e6ae35f26eac8583917019e6134dceabfe97b1eed357e6
@@ -136,6 +136,13 @@ module Beaker
136
136
  on(host, "rm -rf #{client_datadir}")
137
137
  end
138
138
 
139
+ #Return true if tlsv1 protocol needs to be enforced
140
+ #param [Host] the host
141
+ def require_tlsv1?(host)
142
+ tlsv1_platforms = [/AIX/, /el-5/, /solaris10/]
143
+ return tlsv1_platforms.any? {|platform_regex| host['platform'] =~ platform_regex}
144
+ end
145
+
139
146
  # Generate the command line string needed to from a frictionless puppet-agent
140
147
  # install on this host in a PE environment.
141
148
  #
@@ -187,7 +194,10 @@ module Beaker
187
194
 
188
195
  cmd = %Q{powershell -c "cd #{host['working_dir']};#{cert_validator};\\$webClient = New-Object System.Net.WebClient;\\$webClient.DownloadFile('https://#{downloadhost}:8140/packages/current/install.ps1', '#{host['working_dir']}/install.ps1');#{host['working_dir']}/install.ps1 -verbose #{frictionless_install_opts.join(' ')}"}
189
196
  else
190
- curl_opts = %w{--tlsv1 -O}
197
+ curl_opts = %w{-O}
198
+ if version_is_less(pe_version, '2019.1.0') || require_tlsv1?(host)
199
+ curl_opts << '--tlsv1'
200
+ end
191
201
  if use_puppet_ca_cert
192
202
  curl_opts << '--cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem'
193
203
  elsif host['platform'] !~ /aix/
@@ -3,7 +3,7 @@ module Beaker
3
3
  module PE
4
4
 
5
5
  module Version
6
- STRING = '2.0.6'
6
+ STRING = '2.1.0'
7
7
  end
8
8
 
9
9
  end
@@ -240,7 +240,7 @@ describe ClassMixedWithDSLInstallUtils do
240
240
  expecting = [
241
241
  "FRICTIONLESS_TRACE='true'",
242
242
  "export FRICTIONLESS_TRACE",
243
- "cd /tmp && curl --tlsv1 -O -k https://testmaster:8140/packages/current/install.bash && bash install.bash"
243
+ "cd /tmp && curl -O --tlsv1 -k https://testmaster:8140/packages/current/install.bash && bash install.bash"
244
244
  ].join("; ")
245
245
 
246
246
  expect( subject.frictionless_agent_installer_cmd( host, {}, '2016.4.0' ) ).to eq(expecting)
@@ -251,7 +251,7 @@ describe ClassMixedWithDSLInstallUtils do
251
251
  expecting = [
252
252
  "FRICTIONLESS_TRACE='true'",
253
253
  "export FRICTIONLESS_TRACE",
254
- "cd /tmp && curl --tlsv1 -O --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem https://testmaster:8140/packages/current/install.bash && bash install.bash"
254
+ "cd /tmp && curl -O --tlsv1 --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem https://testmaster:8140/packages/current/install.bash && bash install.bash"
255
255
  ].join("; ")
256
256
 
257
257
  expect( subject.frictionless_agent_installer_cmd( host, {}, '2016.4.0' ) ).to eq(expecting)
@@ -262,7 +262,7 @@ describe ClassMixedWithDSLInstallUtils do
262
262
  expecting = [
263
263
  "FRICTIONLESS_TRACE='true'",
264
264
  "export FRICTIONLESS_TRACE",
265
- "cd /tmp && curl --tlsv1 -O https://testmaster:8140/packages/current/install.bash && bash install.bash"
265
+ "cd /tmp && curl -O --tlsv1 https://testmaster:8140/packages/current/install.bash && bash install.bash"
266
266
  ].join("; ")
267
267
 
268
268
  expect( subject.frictionless_agent_installer_cmd( host, {}, '2016.4.0' ) ).to eq(expecting)
@@ -309,7 +309,7 @@ describe ClassMixedWithDSLInstallUtils do
309
309
  expecting = [
310
310
  "FRICTIONLESS_TRACE='true'",
311
311
  "export FRICTIONLESS_TRACE",
312
- "cd /tmp && curl --tlsv1 -O -k https://testloadbalancer:8140/packages/current/install.bash && bash install.bash"
312
+ "cd /tmp && curl -O --tlsv1 -k https://testloadbalancer:8140/packages/current/install.bash && bash install.bash"
313
313
  ].join("; ")
314
314
 
315
315
  expect( subject.frictionless_agent_installer_cmd( lb_test_hosts[3], {}, '2016.4.0' ) ).to eq(expecting)
@@ -320,7 +320,7 @@ describe ClassMixedWithDSLInstallUtils do
320
320
  expecting = [
321
321
  "FRICTIONLESS_TRACE='true'",
322
322
  "export FRICTIONLESS_TRACE",
323
- "cd /tmp && curl --tlsv1 -O -k https://testmaster:8140/packages/current/install.bash && bash install.bash"
323
+ "cd /tmp && curl -O --tlsv1 -k https://testmaster:8140/packages/current/install.bash && bash install.bash"
324
324
  ].join("; ")
325
325
 
326
326
  expect( subject.frictionless_agent_installer_cmd( host, {}, '2016.4.0' ) ).to eq(expecting)
@@ -331,11 +331,30 @@ describe ClassMixedWithDSLInstallUtils do
331
331
  expecting = [
332
332
  "FRICTIONLESS_TRACE='true'",
333
333
  "export FRICTIONLESS_TRACE",
334
- "cd /tmp && curl --tlsv1 -O -k https://testmaster:8140/packages/current/install.bash && bash install.bash --puppet-service-debug"
334
+ "cd /tmp && curl -O --tlsv1 -k https://testmaster:8140/packages/current/install.bash && bash install.bash --puppet-service-debug"
335
335
  ].join("; ")
336
336
 
337
337
  expect( subject.frictionless_agent_installer_cmd( host, {}, '2018.1.0' ) ).to eq(expecting)
338
338
  end
339
+ it 'generates a unix PE frictionless install command with no --tlsv1 flag if installing 2019.1.0' do
340
+ expecting = [
341
+ "FRICTIONLESS_TRACE='true'",
342
+ "export FRICTIONLESS_TRACE",
343
+ "cd /tmp && curl -O -k https://testmaster:8140/packages/current/install.bash && bash install.bash"
344
+ ].join("; ")
345
+
346
+ expect( subject.frictionless_agent_installer_cmd( host, {}, '2019.1.0' ) ).to eq(expecting)
347
+ end
348
+ it 'generates a unix PE frictionless install command with --tlsv1 flag if installing 2019.1.0 on solaris10' do
349
+ host[:platform] = 'solaris10'
350
+ expecting = [
351
+ "FRICTIONLESS_TRACE='true'",
352
+ "export FRICTIONLESS_TRACE",
353
+ "cd /tmp && curl -O --tlsv1 -k https://testmaster:8140/packages/current/install.bash && bash install.bash"
354
+ ].join("; ")
355
+
356
+ expect( subject.frictionless_agent_installer_cmd( host, {}, '2019.1.0' ) ).to eq(expecting)
357
+ end
339
358
  end
340
359
 
341
360
  describe 'install_ca_cert_on' do
@@ -379,7 +398,7 @@ describe ClassMixedWithDSLInstallUtils do
379
398
  the_host['pe_ver'] = '3.8.0'
380
399
  the_host['pe_installer'] = 'puppet-enterprise-installer'
381
400
  the_host['roles'] = ['frictionless']
382
- expect( subject.installer_cmd( the_host, {} ) ).to be === "FRICTIONLESS_TRACE='true'; export FRICTIONLESS_TRACE; cd /tmp && curl --tlsv1 -O -k https://testmaster:8140/packages/current/install.bash && bash install.bash"
401
+ expect( subject.installer_cmd( the_host, {} ) ).to be === "FRICTIONLESS_TRACE='true'; export FRICTIONLESS_TRACE; cd /tmp && curl -O --tlsv1 -k https://testmaster:8140/packages/current/install.bash && bash install.bash"
383
402
  end
384
403
 
385
404
  it 'generates a unix PE frictionless install command for a unix host with role "frictionless" and "frictionless_options"' do
@@ -389,7 +408,7 @@ describe ClassMixedWithDSLInstallUtils do
389
408
  the_host['pe_installer'] = 'puppet-enterprise-installer'
390
409
  the_host['roles'] = ['frictionless']
391
410
  the_host['frictionless_options'] = { 'main' => { 'dns_alt_names' => 'puppet' } }
392
- expect( subject.installer_cmd( the_host, {} ) ).to be === "FRICTIONLESS_TRACE='true'; export FRICTIONLESS_TRACE; cd /tmp && curl --tlsv1 -O -k https://testmaster:8140/packages/current/install.bash && bash install.bash main:dns_alt_names=puppet"
411
+ expect( subject.installer_cmd( the_host, {} ) ).to be === "FRICTIONLESS_TRACE='true'; export FRICTIONLESS_TRACE; cd /tmp && curl -O --tlsv1 -k https://testmaster:8140/packages/current/install.bash && bash install.bash main:dns_alt_names=puppet"
393
412
  end
394
413
 
395
414
  it 'generates a osx PE install command for a osx host' do
@@ -426,7 +445,7 @@ describe ClassMixedWithDSLInstallUtils do
426
445
  the_host['pe_installer'] = 'puppet-enterprise-installer'
427
446
  the_host['roles'] = ['frictionless']
428
447
  the_host[:pe_debug] = true
429
- expect( subject.installer_cmd( the_host, {} ) ).to be === "FRICTIONLESS_TRACE='true'; export FRICTIONLESS_TRACE; cd /tmp && curl --tlsv1 -O -k https://testmaster:8140/packages/current/install.bash && bash -x install.bash"
448
+ expect( subject.installer_cmd( the_host, {} ) ).to be === "FRICTIONLESS_TRACE='true'; export FRICTIONLESS_TRACE; cd /tmp && curl -O --tlsv1 -k https://testmaster:8140/packages/current/install.bash && bash -x install.bash"
430
449
  end
431
450
  end
432
451
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-pe
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-06 00:00:00.000000000 Z
11
+ date: 2019-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec