beaker-puppet 0.13.4 → 0.13.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cca1d57bd1c5a2a3fa77787a878ab3053ee09516
|
4
|
+
data.tar.gz: 112ffe35c2a225167dcb9595c14a04e1ecd1653c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd6fd41e1779ada512ceaa7f34afb40d93871e533c80d77e298d48ba6d89d505cde488eb864645015dd0dce29ba0f1740f231fbbb77528bdc30f600f019cf6f7
|
7
|
+
data.tar.gz: 50249278eaf41ccad9d7e275fd37ba729021ee686091ef1bea86e76ba29d11cf82e8b8bd9727a38e4ab1c9aa676c4a7e1733f3cf61587fccfc1124fee38b9311
|
@@ -633,6 +633,9 @@ module Beaker
|
|
633
633
|
# forge api v1 canonical source is forge.puppetlabs.com
|
634
634
|
# forge api v3 canonical source is forgeapi.puppetlabs.com
|
635
635
|
#
|
636
|
+
# @deprecated this method should not be used because stubbing the host
|
637
|
+
# breaks TLS validation.
|
638
|
+
#
|
636
639
|
# @param machine [String] the host to perform the stub on
|
637
640
|
# @param forge_host [String] The URL to use as the forge alias, will default to using :forge_host in the
|
638
641
|
# global options hash
|
@@ -654,6 +657,9 @@ module Beaker
|
|
654
657
|
# forge api v1 canonical source is forge.puppetlabs.com
|
655
658
|
# forge api v3 canonical source is forgeapi.puppetlabs.com
|
656
659
|
#
|
660
|
+
# @deprecated this method should not be used because stubbing the host
|
661
|
+
# breaks TLS validation.
|
662
|
+
#
|
657
663
|
# @param host [String] the host to perform the stub on
|
658
664
|
# @param forge_host [String] The URL to use as the forge alias, will default to using :forge_host in the
|
659
665
|
# global options hash
|
@@ -669,6 +675,9 @@ module Beaker
|
|
669
675
|
|
670
676
|
# This wraps `with_forge_stubbed_on` and provides it the default host
|
671
677
|
# @see with_forge_stubbed_on
|
678
|
+
#
|
679
|
+
# @deprecated this method should not be used because stubbing the host
|
680
|
+
# breaks TLS validation.
|
672
681
|
def with_forge_stubbed( forge_host = nil, &block )
|
673
682
|
with_forge_stubbed_on( default, forge_host, &block )
|
674
683
|
end
|
@@ -676,6 +685,9 @@ module Beaker
|
|
676
685
|
# This wraps the method `stub_hosts` and makes the stub specific to
|
677
686
|
# the forge alias.
|
678
687
|
#
|
688
|
+
# @deprecated this method should not be used because stubbing the host
|
689
|
+
# breaks TLS validation.
|
690
|
+
#
|
679
691
|
# @see #stub_forge_on
|
680
692
|
def stub_forge(forge_host = nil)
|
681
693
|
#use global options hash
|
@@ -24,9 +24,7 @@ module Beaker
|
|
24
24
|
# @see install_dev_puppet_module
|
25
25
|
def install_dev_puppet_module_on( host, opts )
|
26
26
|
if options[:forge_host]
|
27
|
-
|
28
|
-
install_puppet_module_via_pmt_on( host, opts )
|
29
|
-
end
|
27
|
+
install_puppet_module_via_pmt_on( host, opts )
|
30
28
|
else
|
31
29
|
copy_module_to( host, opts )
|
32
30
|
end
|
@@ -75,6 +73,14 @@ module Beaker
|
|
75
73
|
puppet_opts = host[:default_module_install_opts].merge( puppet_opts )
|
76
74
|
end
|
77
75
|
|
76
|
+
if options[:forge_host]
|
77
|
+
if options[:forge_host] =~ /^http/
|
78
|
+
puppet_opts[:module_repository] = options[:forge_host]
|
79
|
+
else
|
80
|
+
puppet_opts[:module_repository] = "https://#{options[:forge_host]}"
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
78
84
|
on h, puppet("module install #{modname} #{version_info}", puppet_opts)
|
79
85
|
end
|
80
86
|
end
|
@@ -34,15 +34,12 @@ describe ClassMixedWithDSLInstallUtils do
|
|
34
34
|
master = hosts.first
|
35
35
|
allow( subject ).to receive( :options ).and_return( {:forge_host => 'ahost.com'} )
|
36
36
|
|
37
|
-
expect( subject ).to receive( :with_forge_stubbed_on )
|
38
|
-
|
39
37
|
subject.install_dev_puppet_module_on( master, {:source => '/module', :module_name => 'test'} )
|
40
38
|
end
|
41
39
|
|
42
40
|
it 'installs via #install_puppet_module_via_pmt' do
|
43
41
|
master = hosts.first
|
44
42
|
allow( subject ).to receive( :options ).and_return( {:forge_host => 'ahost.com'} )
|
45
|
-
allow( subject ).to receive( :with_forge_stubbed_on ).and_yield
|
46
43
|
|
47
44
|
expect( subject ).to receive( :install_puppet_module_via_pmt_on )
|
48
45
|
|
@@ -78,6 +75,7 @@ describe ClassMixedWithDSLInstallUtils do
|
|
78
75
|
describe '#install_puppet_module_via_pmt_on' do
|
79
76
|
it 'installs module via puppet module tool' do
|
80
77
|
allow( subject ).to receive( :hosts ).and_return( hosts )
|
78
|
+
allow( subject ).to receive( :options ).and_return( {} )
|
81
79
|
master = hosts.first
|
82
80
|
|
83
81
|
allow( subject ).to receive( :on ).once
|
@@ -88,6 +86,7 @@ describe ClassMixedWithDSLInstallUtils do
|
|
88
86
|
|
89
87
|
it 'takes the trace option and passes it down correctly' do
|
90
88
|
allow( subject ).to receive( :hosts ).and_return( hosts )
|
89
|
+
allow( subject ).to receive( :options ).and_return( {} )
|
91
90
|
master = hosts.first
|
92
91
|
trace_opts = { :trace => nil }
|
93
92
|
master['default_module_install_opts'] = trace_opts
|
@@ -97,6 +96,30 @@ describe ClassMixedWithDSLInstallUtils do
|
|
97
96
|
|
98
97
|
subject.install_puppet_module_via_pmt_on( master, {:module_name => 'test'} )
|
99
98
|
end
|
99
|
+
|
100
|
+
it 'takes the forge_host option as a hostname and passes it down correctly' do
|
101
|
+
allow( subject ).to receive( :hosts ).and_return( hosts )
|
102
|
+
allow( subject ).to receive( :options ).and_return( {:forge_host => 'forge.example.com'} )
|
103
|
+
master = hosts.first
|
104
|
+
forge_opts = { :module_repository => 'https://forge.example.com' }
|
105
|
+
|
106
|
+
allow( subject ).to receive( :on ).once
|
107
|
+
expect( subject ).to receive( :puppet ).with('module install test ', forge_opts).once
|
108
|
+
|
109
|
+
subject.install_puppet_module_via_pmt_on( master, {:module_name => 'test'} )
|
110
|
+
end
|
111
|
+
|
112
|
+
it 'takes the forge_host option as a url and passes it down correctly' do
|
113
|
+
allow( subject ).to receive( :hosts ).and_return( hosts )
|
114
|
+
allow( subject ).to receive( :options ).and_return( {:forge_host => 'http://forge.example.com'} )
|
115
|
+
master = hosts.first
|
116
|
+
forge_opts = { :module_repository => 'http://forge.example.com' }
|
117
|
+
|
118
|
+
allow( subject ).to receive( :on ).once
|
119
|
+
expect( subject ).to receive( :puppet ).with('module install test ', forge_opts).once
|
120
|
+
|
121
|
+
subject.install_puppet_module_via_pmt_on( master, {:module_name => 'test'} )
|
122
|
+
end
|
100
123
|
end
|
101
124
|
|
102
125
|
describe '#install_puppet_module_via_pmt' 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: 0.13.
|
4
|
+
version: 0.13.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|