Skip to content

Commit 18b09d1

Browse files
committed
MERGE WITH e969c7c
In e969c7c, we remove the code related to `pe_compiling_server_aio_build` which was unused. The unit tests that where testing / tweaking it can be removed.
1 parent 7412459 commit 18b09d1

9 files changed

+0
-47
lines changed

spec/classes/puppet_agent_osfamily_aix_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535

3636
before(:each) do
3737
Puppet::Parser::Functions.newfunction(:pe_build_version, type: :rvalue) { |_args| '2000.0.0' }
38-
Puppet::Parser::Functions.newfunction(:pe_compiling_server_aio_build, type: :rvalue) { |_args| '1.10.100' }
3938
end
4039

4140
it { is_expected.to contain_file('/opt/puppetlabs') }
@@ -75,7 +74,6 @@
7574

7675
before(:each) do
7776
Puppet::Parser::Functions.newfunction(:pe_build_version, type: :rvalue) { |_args| '2000.0.0' }
78-
Puppet::Parser::Functions.newfunction(:pe_compiling_server_aio_build, type: :rvalue) { |_args| '1.10.100' }
7977
end
8078

8179
it {

spec/classes/puppet_agent_osfamily_darwin_spec.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
require 'spec_helper'
22

33
describe 'puppet_agent' do
4-
master_package_version = '1.10.100'
54
before(:each) do
65
# Need to mock the PE functions
76
Puppet::Parser::Functions.newfunction(:pe_build_version, type: :rvalue) do |_args|
87
'2000.0.0'
98
end
109

11-
Puppet::Parser::Functions.newfunction(:pe_compiling_server_aio_build, type: :rvalue) do |_args|
12-
master_package_version
13-
end
14-
1510
allow(Puppet::FileSystem).to receive(:exist?).and_call_original
1611
allow(Puppet::FileSystem).to receive(:read_preserve_line_endings).and_call_original
1712
allow(Puppet::FileSystem).to receive(:exist?).with('/opt/puppetlabs/puppet/VERSION').and_return true

spec/classes/puppet_agent_osfamily_debian_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@
3838
Puppet::Parser::Functions.newfunction(:pe_build_version, type: :rvalue) do |_args|
3939
'2000.0.0'
4040
end
41-
42-
Puppet::Parser::Functions.newfunction(:pe_compiling_server_aio_build, type: :rvalue) do |_args|
43-
package_version
44-
end
4541
end
4642

4743
let(:facts) do

spec/classes/puppet_agent_osfamily_redhat_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,6 @@
168168
Puppet::Parser::Functions.newfunction(:pe_build_version, type: :rvalue) do |_args|
169169
'2000.0.0'
170170
end
171-
172-
Puppet::Parser::Functions.newfunction(:pe_compiling_server_aio_build, type: :rvalue) do |_args|
173-
'5.5.4'
174-
end
175171
end
176172

177173
let(:facts) do

spec/classes/puppet_agent_osfamily_solaris_spec.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ def install_script(ver, arch)
100100
pe_version
101101
end
102102

103-
Puppet::Parser::Functions.newfunction(:pe_compiling_server_aio_build, type: :rvalue) do |_args|
104-
package_version
105-
end
106-
107103
# Ensure we get a versionable package provider
108104
pkg = Puppet::Type.type(:package)
109105
allow(pkg).to receive(:defaultprovider).and_return(pkg.provider(:pkg))
@@ -310,10 +306,6 @@ def install_script(ver, arch)
310306
Puppet::Parser::Functions.newfunction(:pe_build_version, type: :rvalue) do |_args|
311307
pe_version
312308
end
313-
314-
Puppet::Parser::Functions.newfunction(:pe_compiling_server_aio_build, type: :rvalue) do |_args|
315-
package_version
316-
end
317309
end
318310

319311
let(:facts) do

spec/classes/puppet_agent_osfamily_suse_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,6 @@
222222
Puppet::Parser::Functions.newfunction(:pe_build_version, type: :rvalue) do |_args|
223223
'2000.0.0'
224224
end
225-
226-
Puppet::Parser::Functions.newfunction(:pe_compiling_server_aio_build, type: :rvalue) do |_args|
227-
package_version
228-
end
229225
end
230226

231227
describe 'supported environment' do

spec/classes/puppet_agent_osfamily_windows_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
pe_version
1414
end
1515

16-
Puppet::Parser::Functions.newfunction(:pe_compiling_server_aio_build, type: :rvalue) do |_args|
17-
package_version
18-
end
19-
2016
allow(Puppet::Util).to receive(:absolute_path?).and_call_original
2117
allow(Puppet::Util).to receive(:absolute_path?).with(version_file).and_return true
2218
allow(Puppet::FileSystem).to receive(:exist?).and_call_original

spec/classes/puppet_agent_spec.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,6 @@ def global_facts(facts, os)
201201
end
202202
end
203203

204-
context 'package_version is undef if pe_compiling_server_aio_build is not defined' do
205-
let(:facts) do
206-
global_facts(facts, os).merge(is_pe: true)
207-
end
208-
209-
it { is_expected.to contain_class('puppet_agent').with_package_version(nil) }
210-
end
211-
212204
context 'package_version is same as master when set to auto' do
213205
let(:params) { { package_version: 'auto' } }
214206
let(:node_params) { { serverversion: '7.6.5' } }
@@ -268,10 +260,6 @@ def global_facts(facts, os)
268260
Puppet::Parser::Functions.newfunction(:pe_build_version, type: :rvalue) do |_args|
269261
'2000.0.0'
270262
end
271-
272-
Puppet::Parser::Functions.newfunction(:pe_compiling_server_aio_build, type: :rvalue) do |_args|
273-
'1.10.100'
274-
end
275263
end
276264
end
277265

spec/classes/puppet_agent_windows_install_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
Puppet::Parser::Functions.newfunction(:pe_build_version, type: :rvalue) do |_args|
3434
'4.10.100'
3535
end
36-
37-
Puppet::Parser::Functions.newfunction(:pe_compiling_server_aio_build, type: :rvalue) do |_args|
38-
package_version
39-
end
4036
end
4137

4238
let(:facts) { facts.merge({ is_pe: true }) }

0 commit comments

Comments
 (0)