beaker-puppet 1.18.14 → 1.18.15
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d7464999b32767212b3ba2f20b6018446e11d2d87a1c4b05b623c82b2cd1112
|
4
|
+
data.tar.gz: 96e6513d7e477276ac30d4c380d79f70e37a2ccad1ac87f9dc197d57c9ec60f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df1b72ec841b70eac0fa3bab3ad731b22c0070b2303178f0da110fbe728de077f31a1e4ada11b71c008cf9785decd947df2ca7bf4845ad23ab3f7706362b26fd
|
7
|
+
data.tar.gz: 690d02f1c91398b44ec9eb3a10440349e6b4ba05258a3be48885124bf6c0bf673f99648efffed0244328476c0da6dba5fb5629c57cadf8f945c1efbb737ed776
|
@@ -677,7 +677,8 @@ module Beaker
|
|
677
677
|
|
678
678
|
if host.is_cygwin?
|
679
679
|
# NOTE: it is critical that -o be before -O on Windows
|
680
|
-
|
680
|
+
proxy = opts[:package_proxy] ? "-x #{opts[:package_proxy]} " : ''
|
681
|
+
on host, "curl #{proxy}-o \"#{msi_download_path}\" -O #{link}"
|
681
682
|
|
682
683
|
#Because the msi installer doesn't add Puppet to the environment path
|
683
684
|
#Add both potential paths for simplicity
|
@@ -685,7 +686,8 @@ module Beaker
|
|
685
686
|
puppetbin_path = "\"/cygdrive/c/Program Files (x86)/Puppet Labs/Puppet/bin\":\"/cygdrive/c/Program Files/Puppet Labs/Puppet/bin\""
|
686
687
|
on host, %Q{ echo 'export PATH=$PATH:#{puppetbin_path}' > /etc/bash.bashrc }
|
687
688
|
else
|
688
|
-
|
689
|
+
webclient_proxy = opts[:package_proxy] ? "$webclient.Proxy = New-Object System.Net.WebProxy('#{opts[:package_proxy]}',$true); " : ''
|
690
|
+
on host, powershell("$webclient = New-Object System.Net.WebClient; #{webclient_proxy}$webclient.DownloadFile('#{link}','#{msi_download_path}')")
|
689
691
|
end
|
690
692
|
|
691
693
|
opts = { :debug => host[:pe_debug] || opts[:pe_debug] }
|
@@ -38,6 +38,7 @@ describe ClassMixedWithDSLInstallUtils do
|
|
38
38
|
:working_dir => '/tmp',
|
39
39
|
:type => 'foss',
|
40
40
|
:is_cygwin => 'false' } ) }
|
41
|
+
|
41
42
|
let(:machost) { make_host( 'machost', { :platform => 'osx-10.9-x86_64',
|
42
43
|
:pe_ver => '3.0',
|
43
44
|
:type => 'foss',
|
@@ -347,6 +348,15 @@ describe ClassMixedWithDSLInstallUtils do
|
|
347
348
|
subject.install_puppet_from_msi( winhost, {:version => '3.7.1', :win_download_url => 'http://downloads.puppet.com/windows'} )
|
348
349
|
end
|
349
350
|
|
351
|
+
it 'installs puppet on cygwin windows via proxy' do
|
352
|
+
allow(subject).to receive(:link_exists?).and_return( true )
|
353
|
+
expect(subject).to receive(:on).with(winhost, "curl -x https://proxy.com -o \"#{win_temp}\\puppet-3.7.1-x64.msi\" -O http://downloads.puppet.com/windows/puppet-3.7.1-x64.msi")
|
354
|
+
expect(subject).to receive(:on).with(winhost, " echo 'export PATH=$PATH:\"/cygdrive/c/Program Files (x86)/Puppet Labs/Puppet/bin\":\"/cygdrive/c/Program Files/Puppet Labs/Puppet/bin\"' > /etc/bash.bashrc ")
|
355
|
+
expect(subject).to receive(:install_msi_on).with(winhost, "#{win_temp}\\puppet-3.7.1-x64.msi", {}, {:debug => nil})
|
356
|
+
|
357
|
+
subject.install_puppet_from_msi( winhost, {:version => '3.7.1', :win_download_url => 'http://downloads.puppet.com/windows', :package_proxy => 'https://proxy.com'} )
|
358
|
+
end
|
359
|
+
|
350
360
|
it 'installs puppet on non-cygwin windows' do
|
351
361
|
allow(subject).to receive(:link_exists?).and_return( true )
|
352
362
|
|
@@ -354,13 +364,29 @@ describe ClassMixedWithDSLInstallUtils do
|
|
354
364
|
|
355
365
|
expect(subject).to receive(:on).with(winhost_non_cygwin, instance_of( Beaker::Command )) do |host, beaker_command|
|
356
366
|
expect(beaker_command.command).to eq('powershell.exe')
|
357
|
-
expect(beaker_command.args).to eq(["-ExecutionPolicy Bypass", "-InputFormat None", "-NoLogo", "-NoProfile", "-NonInteractive", "-Command $webclient = New-Object System.Net.WebClient;
|
367
|
+
expect(beaker_command.args).to eq(["-ExecutionPolicy Bypass", "-InputFormat None", "-NoLogo", "-NoProfile", "-NonInteractive", "-Command $webclient = New-Object System.Net.WebClient; $webclient.DownloadFile('http://downloads.puppet.com/windows/puppet-3.7.1.msi','#{win_temp}\\puppet-3.7.1.msi')"])
|
358
368
|
end.once
|
359
369
|
|
360
370
|
expect(subject).to receive(:install_msi_on).with(winhost_non_cygwin, "#{win_temp}\\puppet-3.7.1.msi", {}, {:debug => nil})
|
361
371
|
|
362
372
|
subject.install_puppet_from_msi( winhost_non_cygwin, {:version => '3.7.1', :win_download_url => 'http://downloads.puppet.com/windows'} )
|
363
373
|
end
|
374
|
+
|
375
|
+
it 'installs puppet on non-cygwin windows via proxy' do
|
376
|
+
allow(subject).to receive(:link_exists?).and_return( true )
|
377
|
+
|
378
|
+
expect(winhost_non_cygwin).to receive(:mkdir_p).with('C:\\ProgramData\\PuppetLabs\\puppet\\etc\\modules')
|
379
|
+
|
380
|
+
expect(subject).to receive(:on).with(winhost_non_cygwin, instance_of( Beaker::Command )) do |host, beaker_command|
|
381
|
+
expect(beaker_command.command).to eq('powershell.exe')
|
382
|
+
expect(beaker_command.args).to eq(["-ExecutionPolicy Bypass", "-InputFormat None", "-NoLogo", "-NoProfile", "-NonInteractive", "-Command $webclient = New-Object System.Net.WebClient; $webclient.Proxy = New-Object System.Net.WebProxy('https://proxy.com',$true); $webclient.DownloadFile('http://downloads.puppet.com/windows/puppet-3.7.1.msi','#{win_temp}\\puppet-3.7.1.msi')"])
|
383
|
+
end.once
|
384
|
+
|
385
|
+
expect(subject).to receive(:install_msi_on).with(winhost_non_cygwin, "#{win_temp}\\puppet-3.7.1.msi", {}, {:debug => nil})
|
386
|
+
|
387
|
+
subject.install_puppet_from_msi( winhost_non_cygwin, {:version => '3.7.1', :win_download_url => 'http://downloads.puppet.com/windows', :package_proxy => 'https://proxy.com'})
|
388
|
+
|
389
|
+
end
|
364
390
|
end
|
365
391
|
|
366
392
|
context 'clone_git_repo_on' do
|
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.
|
4
|
+
version: 1.18.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|