Skip to content

Commit 1e1d497

Browse files
ekohlehelms
authored andcommitted
Stop using legacy facts in tests
1 parent afb1f22 commit 1e1d497

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

spec/classes/foreman_proxy_content_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
.with(content_service_worker_timeout: 90)
1616
.with(api_service_worker_timeout: 90)
1717
.with(allowed_content_checksums: ['sha1', 'sha224', 'sha256', 'sha384', 'sha512'])
18-
.with(api_client_auth_cn_map: {facts[:fqdn] => 'admin'})
18+
.with(api_client_auth_cn_map: {facts[:networking]['fqdn'] => 'admin'})
1919
.with(allowed_import_path: ['/var/lib/pulp/sync_imports', '/var/lib/pulp/imports'])
2020
.with(allowed_export_path: ['/var/lib/pulp/exports'])
2121
.that_comes_before('Class[foreman_proxy::plugin::pulp]')
2222
end
2323

2424
it do
2525
is_expected.to contain_class('foreman_proxy::plugin::pulp')
26-
.with_rhsm_url("https://#{facts[:fqdn]}:443/rhsm")
26+
.with_rhsm_url("https://#{facts[:networking]['fqdn']}:443/rhsm")
2727
end
2828

2929
context 'with custom import/export paths as arrays' do
@@ -196,7 +196,7 @@
196196
end
197197
it do
198198
is_expected.to contain_class('foreman_proxy::plugin::pulp')
199-
.with_rhsm_url("https://#{facts[:fqdn]}:443/rhsm")
199+
.with_rhsm_url("https://#{facts[:networking]['fqdn']}:443/rhsm")
200200
end
201201
it do
202202
is_expected.not_to contain_foreman_proxy_content__reverse_proxy('rhsm-pulpcore-https-8443')

spec/defines/foreman_proxy_content__reverse_proxy_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
it { is_expected.to compile.with_all_deps }
1818
it do
1919
is_expected.to contain_apache__vhost('my-reverse-proxy')
20-
.with_servername(facts[:fqdn])
20+
.with_servername(facts[:networking]['fqdn'])
2121
.with_serveraliases([])
2222
.with_port(443)
2323
.with_proxy_pass([{
2424
'path' => '/',
25-
'url' => "https://#{facts[:fqdn]}/",
26-
'reverse_urls' => ["https://#{facts[:fqdn]}/"],
25+
'url' => "https://#{facts[:networking]['fqdn']}/",
26+
'reverse_urls' => ["https://#{facts[:networking]['fqdn']}/"],
2727
'params' => {'disablereuse' => 'on', 'retry' => '0'},
2828
}])
2929
end

0 commit comments

Comments
 (0)