ipatests: disable dnssec validation in tests using dnf

The 2 following tests rely on dnf install and use
mirrors.fedoraproject.org which has a broken trust chain.
Disable dnssec validation so that dnf succeeds.

Fixes: https://pagure.io/freeipa/issue/9498

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Florence Blanc-Renaud 2023-12-14 08:29:56 +01:00
parent d1e09c68af
commit a177121af6
2 changed files with 14 additions and 1 deletions

View File

@ -50,6 +50,16 @@ class TestAdvice(IntegrationTest):
num_replicas = 0
num_clients = 1
@classmethod
def install(cls, mh):
# Install without dnssec validation because the test is
# calling dnf install on the client and mirrors.fedoraproject.org
# has a broken trust chain
tasks.install_master(
cls.master, setup_dns=True, extra_args=['--no-dnssec-validation']
)
tasks.install_client(cls.master, cls.clients[0])
def execute_advise(self, host, advice_id, *args):
# ipa-advise script is only available on a server
tasks.kinit_admin(self.master)

View File

@ -1262,7 +1262,10 @@ class TestInstallMaster(IntegrationTest):
tasks.uninstall_packages(self.master, [package_name])
reinstall = True
try:
tasks.install_master(self.master)
# Disable dnssec-validation as the test is calling dnf install
# and mirrors.fedoraproject.org have a broken trust chain
tasks.install_master(self.master,
extra_args=['--no-dnssec-validation'])
finally:
if reinstall:
tasks.install_packages(self.master, [package_name])