Skip to content

Commit 869fe8e

Browse files
committed
Remove testing workarounds from Puppet < 6
PR voxpupuli#927 removed Puppet 6 support, so we should be safely able to remove these testing workarounds
1 parent 8d627d3 commit 869fe8e

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

spec/classes/rabbitmq_spec.rb

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,12 @@
8181
context 'with no pin', if: facts[:os]['family'] == 'Debian' do
8282
let(:params) { { repos_ensure: true, package_apt_pin: '' } }
8383

84-
if Puppet.version =~ %r{^[6,7]} # https://tickets.puppetlabs.com/browse/PUP-9112 and https://tickets.puppetlabs.com/browse/PUP-9180
85-
let(:expected_key_apt_source_key_content) { 'nil' }
86-
else
87-
let(:expected_key_apt_source_key_content) { ':undef' }
88-
end
89-
9084
describe 'it sets up an apt::source' do
9185
it {
9286
is_expected.to contain_apt__source('rabbitmq').with(
9387
'location' => "https://packagecloud.io/rabbitmq/rabbitmq-server/#{facts[:os]['name'].downcase}",
9488
'repos' => 'main',
95-
'key' => "{\"id\"=>\"8C695B0219AFDEB04A058ED8F4E789204D206F89\", \"source\"=>\"https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey\", \"content\"=>#{expected_key_apt_source_key_content}}"
89+
'key' => '{"id"=>"8C695B0219AFDEB04A058ED8F4E789204D206F89", "source"=>"https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey", "content"=>nil}'
9690
)
9791
}
9892
end
@@ -101,18 +95,12 @@
10195
context 'with pin', if: facts[:os]['family'] == 'Debian' do
10296
let(:params) { { repos_ensure: true, package_apt_pin: '700' } }
10397

104-
if Puppet.version =~ %r{^[6,7]} # https://tickets.puppetlabs.com/browse/PUP-9112 and https://tickets.puppetlabs.com/browse/PUP-9180
105-
let(:expected_key_apt_source_key_content) { 'nil' }
106-
else
107-
let(:expected_key_apt_source_key_content) { ':undef' }
108-
end
109-
11098
describe 'it sets up an apt::source and pin' do
11199
it {
112100
is_expected.to contain_apt__source('rabbitmq').with(
113101
'location' => "https://packagecloud.io/rabbitmq/rabbitmq-server/#{facts[:os]['name'].downcase}",
114102
'repos' => 'main',
115-
'key' => "{\"id\"=>\"8C695B0219AFDEB04A058ED8F4E789204D206F89\", \"source\"=>\"https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey\", \"content\"=>#{expected_key_apt_source_key_content}}"
103+
'key' => '{"id"=>"8C695B0219AFDEB04A058ED8F4E789204D206F89", "source"=>"https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey", "content"=>nil}'
116104
)
117105
}
118106

0 commit comments

Comments
 (0)