Skip to content

Commit b759778

Browse files
committed
Refs #32947 - add tests for the Debian keytab path
1 parent d8879af commit b759778

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/classes/foreman_config_ipa_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
describe 'foreman' do
44
on_supported_os.each do |os, facts|
5-
context "on #{os}", if: facts[:osfamily] == 'RedHat' do
5+
context "on #{os}" do
66
let(:facts) { facts.merge(interfaces: '') }
77
let(:params) { { ipa_authentication: true } }
88

9+
keytab_path = facts[:osfamily] == 'RedHat' ? '/etc/httpd/conf/http.keytab' : '/etc/apache2/http.keytab'
10+
911
describe 'without apache' do
1012
let(:params) { super().merge(apache: false) }
1113
it { should raise_error(Puppet::Error, /External authentication via IPA can only be enabled when Apache is used/) }
@@ -50,7 +52,7 @@
5052
should contain_foreman__config__apache__fragment('lookup_identity')
5153

5254
should contain_foreman__config__apache__fragment('auth_gssapi')
53-
.with_ssl_content(%r{^\s*GssapiCredStore keytab:/etc/httpd/conf/http.keytab$})
55+
.with_ssl_content(%r{^\s*GssapiCredStore keytab:#{keytab_path}$})
5456
.with_ssl_content(/^\s*require pam-account foreman$/)
5557
end
5658

0 commit comments

Comments
 (0)