beaker-pe 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c0d8e3ba1b40ece8b4ce09269696496f8127b94cbd024a561be03c4329eeea8
4
- data.tar.gz: efda94caab15d1fe1a46a7529053dc8c46f22a769740ead35be71e3ab57a1eab
3
+ metadata.gz: 67b0404c59865c818eee51a02ce5788f0aef2f5b753a42c9aea792b51e7be236
4
+ data.tar.gz: a6e7771b5f79635ef39b205eff75079788ebaed1b4fdbac38f241da2092db783
5
5
  SHA512:
6
- metadata.gz: 9d5f4990007e80482f754be9733776583188b57065e5ce0dbd0e5db27aeaa20c86351098e7409fae2dc63627ee9094effb1953634096937678c06a24eb788ccc
7
- data.tar.gz: d50685bbd3c0dec24a7205b5ad009b91a94cd5b8681680a7660d8c33d045b54f64c3de01a3bbb09e98e2b1d8b7a2cb86b9a5cf56b48f50e3ef58e5cedd2f049a
6
+ metadata.gz: 104e1314b325bca84a49450ef3f8934783a7c6b686becacd0a30304af35c1ce360fefaede0545abe8167cd6f528140e999536c5f6f11d4c3a194a88eb95ba28a
7
+ data.tar.gz: 88f0f6c2b7017e5d92b4af70016b24f2d7adb0529a933132862576bb4e8d3f2b651809d4fa69b7c61bd7aa88ad590db74265700ea9b80f754954efeb34d2d037
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.5.0](https://github.com/puppetlabs/beaker-pe/tree/3.5.0) (2025-04-15)
4
+
5
+ [Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.4.0...3.5.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - \(PE-40793\) Follow https->>http redirects [\#287](https://github.com/puppetlabs/beaker-pe/pull/287) ([tvpartytonight](https://github.com/tvpartytonight))
10
+
3
11
  ## [3.4.0](https://github.com/puppetlabs/beaker-pe/tree/3.4.0) (2025-03-12)
4
12
 
5
13
  [Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.3.1...3.4.0)
@@ -1099,7 +1099,12 @@ module Beaker
1099
1099
 
1100
1100
  onhost_copied_download = File.join(onhost_copy_base, download_file)
1101
1101
  onhost_copied_file = File.join(onhost_copy_base, release_file)
1102
- fetch_http_file(release_path, download_file, copy_dir_local)
1102
+ download_uri = URI.parse("#{release_path}/#{download_file}")
1103
+ if (redirect = Net::HTTP.start(download_uri.host) { |http| http.head(download_uri.path).response['location'] })
1104
+ fetch_http_file(redirect.chomp("/#{download_file}"), download_file, copy_dir_local)
1105
+ else
1106
+ fetch_http_file(release_path, download_file, copy_dir_local)
1107
+ end
1103
1108
  scp_to host, File.join(copy_dir_local, download_file), onhost_copy_base
1104
1109
 
1105
1110
  if variant == 'windows'
@@ -3,7 +3,7 @@ module Beaker
3
3
  module PE
4
4
 
5
5
  module Version
6
- STRING = '3.4.0'
6
+ STRING = '3.5.0'
7
7
  end
8
8
 
9
9
  end
@@ -82,6 +82,25 @@ describe ClassMixedWithDSLInstallUtils do
82
82
  subject.logger = logger
83
83
  end
84
84
 
85
+ context '#install_puppet_agent_pe_promoted_repo_on' do
86
+
87
+ it 'will read a redirect if necessary' do
88
+ # Only test the function under test attempts to read the redirect; skip
89
+ # the rest of function by bailing early after that attempt has been verified
90
+ # by raising this special exception
91
+ class SpecialRedirectTestException < StandardError
92
+ end
93
+ opts[:pe_promoted_builds_url] = 'https://mycooltesturl.com'
94
+ allow(Net::HTTP).to receive(:start).with('mycooltesturl.com').and_return('http://mycooltesturlredirect.com/puppet-agent-el-9-x86_64.tar.gz')
95
+ allow(subject).to receive(:fetch_http_file).with('http://mycooltesturlredirect.com', 'puppet-agent-el-9-x86_64.tar.gz', 'tmp/repo_configs/el').and_raise(SpecialRedirectTestException)
96
+ allow(subject).to receive(:sanitize_opts).and_return(opts)
97
+
98
+ test_host = Beaker::Host.create("test", {platform: 'el-9-x86_64'}, opts)
99
+ test_host['platform'] = Beaker::Platform.new(test_host['platform'])
100
+ expect{subject.install_puppet_agent_pe_promoted_repo_on([test_host], opts)}.to raise_error(SpecialRedirectTestException)
101
+ end
102
+ end
103
+
85
104
  context '#prep_host_for_upgrade' do
86
105
 
87
106
  it 'sets per host options before global options' do
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: 3.4.0
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-13 00:00:00.000000000 Z
11
+ date: 2025-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec