beaker-puppet 1.18.2 → 1.18.3

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: 3bddae021974d38725e210d663444a466d7ca34d
4
- data.tar.gz: 82fb093d087111109630e6c5cd2eb09cd14ee756
3
+ metadata.gz: b54c4287a80e22ffd30f5a96d7a11b74d300344b
4
+ data.tar.gz: fe37eed2b606c9848c7f115c769f468716449faf
5
5
  SHA512:
6
- metadata.gz: ccdf72c3ec1c3dee8b7c19684c49b9ca22296032738443bad168b020c55e45dc96578e31f174eb8411ed2a76e9034841a6304e50845df5512b7ff03428d1bd8b
7
- data.tar.gz: f9e7bde883253c36e29223a5f4eeb6ad499ddbefb846fc71592d6c7847ab936e487969db7cf642230539e54bf99ff0f98fdbfa16708113510fc70d3635155bbe
6
+ metadata.gz: 9e8fb91f8776ce8849a48d490861ca1b76171a73f30f04908872ab07acc57e9a145c30ea588e117b08fc5bf457bb9e926968faac7d1dc70b72ed2e3590dc05b1
7
+ data.tar.gz: a59b3c974bfb563e87702b7999ef21a77982a376dbb0e1baed39beaf22811ac70789a3836de04d6d278a0db0f488787518242cc7d8321ecddd1a4739e71b4901
@@ -37,7 +37,7 @@ module Beaker
37
37
  # @param [Hash] the original options to be merged with the default options
38
38
  #
39
39
  # @return [Hash] The finalized set of options
40
- def sanatize_opts(opts)
40
+ def sanitize_opts(opts)
41
41
  # If any of the nightly urls are not set, but the main `:nightly_builds_url`
42
42
  # is set, we should overwrite anything not set.
43
43
  opts[:nightly_apt_repo_url] ||= opts[:nightly_builds_url]
@@ -288,7 +288,7 @@ module Beaker
288
288
  # @raise [StandardError] When encountering an unsupported platform by default, or if gem cannot be found when default_action => 'gem_install'
289
289
  # @raise [FailTest] When error occurs during the actual installation process
290
290
  def install_puppet_on(hosts, opts = options)
291
- opts = sanatize_opts(opts)
291
+ opts = sanitize_opts(opts)
292
292
 
293
293
  # If version isn't specified assume the latest in the 3.x series
294
294
  if opts[:version] and not version_is_less(opts[:version], '4.0.0')
@@ -375,7 +375,7 @@ module Beaker
375
375
  # @raise [StandardError] When encountering an unsupported platform by default, or if gem cannot be found when default_action => 'gem_install'
376
376
  # @raise [FailTest] When error occurs during the actual installation process
377
377
  def install_puppet_agent_on(hosts, opts = {})
378
- opts = sanatize_opts(opts)
378
+ opts = sanitize_opts(opts)
379
379
  opts[:puppet_agent_version] ||= opts[:version] #backwards compatability with old parameter name
380
380
  opts[:puppet_collection] ||= puppet_collection_for(:puppet_agent, opts[:puppet_agent_version]) || 'pc1'
381
381
 
@@ -998,7 +998,7 @@ module Beaker
998
998
  block_on hosts do |host|
999
999
  variant, version, arch, codename = host['platform'].to_array
1000
1000
  repo_name = repo || opts[:puppet_collection] || 'puppet'
1001
- opts = sanatize_opts(opts)
1001
+ opts = sanitize_opts(opts)
1002
1002
 
1003
1003
  case variant
1004
1004
  when /^(fedora|el|redhat|centos|sles|cisco_nexus|cisco_ios_xr)$/
@@ -1107,6 +1107,12 @@ module Beaker
1107
1107
  copy_dir
1108
1108
  )
1109
1109
 
1110
+ if host['platform'].variant =~ /^(ubuntu|debian)$/
1111
+ # Bypass signing checks on this repo and its packages
1112
+ contents = File.read(repo).gsub(/^deb /, "deb [trusted=yes] ")
1113
+ File.write(repo, contents)
1114
+ end
1115
+
1110
1116
  if host[:platform] =~ /cisco_nexus/
1111
1117
  to_path = "#{host.package_config_dir}/#{File.basename(repo)}"
1112
1118
  else
@@ -1114,12 +1120,6 @@ module Beaker
1114
1120
  end
1115
1121
  scp_to( host, repo, to_path )
1116
1122
 
1117
- variant, version, arch, codename = host['platform'].to_array
1118
- if (variant =~ /^ubuntu$/ && version.split('.').first.to_i >= 18) ||
1119
- (variant =~ /^debian$/ && version.split('.').first.to_i >= 10)
1120
- # Allow the use of unsigned repos with Ubuntu 18.04+ and for Debian 10 +
1121
- on host, "echo 'Acquire::AllowInsecureRepositories \"true\";' > /etc/apt/apt.conf.d/90insecure"
1122
- end
1123
1123
  on( host, 'apt-get update' ) if host['platform'] =~ /ubuntu-|debian-|cumulus-|huaweios-/
1124
1124
  nil
1125
1125
  end
@@ -1156,7 +1156,7 @@ module Beaker
1156
1156
  repo_configs_dir ||= 'tmp/repo_configs'
1157
1157
 
1158
1158
  platform_configs_dir = File.join(repo_configs_dir, variant)
1159
- opts = sanatize_opts(opts)
1159
+ opts = sanitize_opts(opts)
1160
1160
 
1161
1161
  # some of the uses of dev_builds_url below can't include protocol info,
1162
1162
  # plus this opens up possibility of switching the behavior on provided
@@ -1165,11 +1165,6 @@ module Beaker
1165
1165
  dev_builds_url = protocol + hostname
1166
1166
  dev_builds_url = opts[:dev_builds_url] if variant =~ /^(fedora|el|redhat|centos)$/
1167
1167
 
1168
- if variant =~ /^ubuntu$/ && version.split('.').first.to_i >= 18
1169
- # Allow the use of unsigned repos with Ubuntu 18.04+
1170
- on host, "echo 'Acquire::AllowInsecureRepositories \"true\";' > /etc/apt/apt.conf.d/90insecure"
1171
- end
1172
-
1173
1168
  install_repo_configs( host, dev_builds_url, package_name,
1174
1169
  build_version, platform_configs_dir )
1175
1170
 
@@ -1250,7 +1245,7 @@ module Beaker
1250
1245
  # you could provide any values you could to one to the other
1251
1246
  puppet_agent_version = opts[:puppet_agent_sha] || opts[:puppet_agent_version]
1252
1247
 
1253
- opts = sanatize_opts(opts)
1248
+ opts = sanitize_opts(opts)
1254
1249
  opts[:download_url] = "#{opts[:dev_builds_url]}/puppet-agent/#{ puppet_agent_version }/repos/"
1255
1250
  opts[:copy_base_local] ||= File.join('tmp', 'repo_configs')
1256
1251
  opts[:puppet_collection] ||= 'PC1'
@@ -1349,7 +1344,7 @@ module Beaker
1349
1344
 
1350
1345
  block_on hosts do |host|
1351
1346
  pe_ver = host[:pe_ver] || opts[:pe_ver] || '4.0.0-rc1'
1352
- opts = sanatize_opts(opts)
1347
+ opts = sanitize_opts(opts)
1353
1348
  opts[:download_url] = "#{opts[:pe_promoted_builds_url]}/puppet-agent/#{ pe_ver }/#{ opts[:puppet_agent_version] }/repos"
1354
1349
  opts[:copy_base_local] ||= File.join('tmp', 'repo_configs')
1355
1350
  opts[:copy_dir_external] ||= host.external_copy_base
@@ -1428,7 +1423,7 @@ module Beaker
1428
1423
  # @option opts [String] :dev_builds_url Custom internal builds URL.
1429
1424
  # Defaults to {DEFAULT_DEV_BUILDS_URL}.
1430
1425
  def install_puppetserver_on(host, opts = {})
1431
- opts = sanatize_opts(opts)
1426
+ opts = sanitize_opts(opts)
1432
1427
 
1433
1428
  # Default to installing latest from nightlies
1434
1429
  opts[:version] ||= 'latest'
@@ -1,3 +1,3 @@
1
1
  module BeakerPuppet
2
- VERSION = '1.18.2'
2
+ VERSION = '1.18.3'
3
3
  end
@@ -71,7 +71,7 @@ describe ClassMixedWithDSLInstallUtils do
71
71
 
72
72
  let(:win_temp) { 'C:\\Windows\\Temp' }
73
73
 
74
- context '#sanatize_opts' do
74
+ context '#sanitize_opts' do
75
75
  let(:opts) {
76
76
  {
77
77
  :win_download_url => nil,
@@ -81,21 +81,21 @@ describe ClassMixedWithDSLInstallUtils do
81
81
  }
82
82
 
83
83
  it 'honors any custom values' do
84
- expect( subject.sanatize_opts(opts)).to include({release_yum_repo_url: 'https://apt.customserver.net/apt'})
84
+ expect( subject.sanitize_opts(opts)).to include({release_yum_repo_url: 'https://apt.customserver.net/apt'})
85
85
  end
86
86
 
87
87
  it 'overwrites any nil values with pre-defined defaults' do
88
88
  default_win_url = described_class::FOSS_DEFAULT_DOWNLOAD_URLS[:win_download_url]
89
- expect( subject.sanatize_opts(opts)).to include({win_download_url: default_win_url})
89
+ expect( subject.sanitize_opts(opts)).to include({win_download_url: default_win_url})
90
90
  end
91
91
 
92
92
  it 'keeps empty strings' do
93
- expect( subject.sanatize_opts(opts)).to include({dev_builds_url: ''})
93
+ expect( subject.sanitize_opts(opts)).to include({dev_builds_url: ''})
94
94
  end
95
95
 
96
96
  it 'adds any undefined defaults' do
97
97
  default_mac_url = described_class::FOSS_DEFAULT_DOWNLOAD_URLS[:mac_download_url]
98
- expect( subject.sanatize_opts(opts)).to include({mac_download_url: default_mac_url})
98
+ expect( subject.sanitize_opts(opts)).to include({mac_download_url: default_mac_url})
99
99
  end
100
100
  end
101
101
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.2
4
+ version: 1.18.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-20 00:00:00.000000000 Z
11
+ date: 2019-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec