Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions test_suite/cloud/test_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,19 +313,21 @@ def test_rhui_certificate_date(self, host):
cert_found = False

if test_lib.is_rhel_sap(host):
cert_file = '/etc/pki/rhui/product/content-sap-ha.crt'
cert_found = host.file(cert_file).exists
possible_cert_files = [
'/etc/pki/rhui/product/content-sap-ha.crt',
'/etc/pki/rhui/product/content-base-sap-ha.crt'
]
else:
possible_cert_files = [
'/etc/pki/rhui/product/content.crt',
'/etc/pki/rhui/product/content-base.crt'
]

for cert in possible_cert_files:
if host.file(cert).exists:
cert_file = cert
cert_found = True
break
for cert in possible_cert_files:
if host.file(cert).exists:
cert_file = cert
cert_found = True
break

assert cert_found, 'The RHUI certificate was not found.'

Expand Down
Loading