Skip to content

Commit 028f9f7

Browse files
committed
Fixes #38259 - Use the correct ssl_port variable
Fixes: f8fb58e ("Fixes #30632 - Set up HTTPClients in DHCP")
1 parent 5bbd7de commit 028f9f7

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

manifests/proxydhcp.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
if $foreman_proxy::http {
114114
$proxy_base_url = "http://${ip}:${foreman_proxy::http_port}"
115115
} else {
116-
$proxy_base_url = "https://${ip}:${foreman_proxy::https_port}"
116+
$proxy_base_url = "https://${ip}:${foreman_proxy::ssl_port}"
117117
}
118118

119119
dhcp::dhcp_class { 'httpclients':

spec/classes/foreman_proxy__proxydhcp__spec.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,23 @@
237237
end
238238
end
239239

240+
context 'with httpboot' do
241+
let(:params) { super().merge(httpboot: true, dhcp_pxeserver: '192.0.2.123') }
242+
243+
context 'with http' do
244+
let(:params) { super().merge(http: true) }
245+
246+
it { is_expected.to compile.with_all_deps }
247+
it { is_expected.to contain_dhcp__dhcp_class('httpclients').with_parameters(%r{^ filename "http://192\.0\.2\.123:8000/EFI/grub2/shim\.efi";$}) }
248+
end
249+
250+
context 'without http' do
251+
let(:params) { super().merge(http: false) }
252+
253+
it { is_expected.to compile.with_all_deps }
254+
it { is_expected.to contain_dhcp__dhcp_class('httpclients').with_parameters(%r{^ filename "https://192\.0\.2\.123:8443/EFI/grub2/shim\.efi";$}) }
255+
end
256+
end
240257
end
241258
end
242259
end

0 commit comments

Comments
 (0)