From 0a108f2868a182969858592ab14302eb3df1bf23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20L=C3=B3pez?= Date: Tue, 17 Oct 2023 16:01:43 +0200 Subject: [PATCH] KCM: Adapt the tests This is an exploratory commit. Not yet ready to be pushed. --- src/tests/intg/test_kcm.py | 5 +++++ src/tests/intg/test_pam_responder.py | 1 + 2 files changed, 6 insertions(+) diff --git a/src/tests/intg/test_kcm.py b/src/tests/intg/test_kcm.py index 0d2638f211f..5f9c7cf28b3 100644 --- a/src/tests/intg/test_kcm.py +++ b/src/tests/intg/test_kcm.py @@ -116,6 +116,11 @@ def kcm_teardown(): except OSError as osex: if osex.errno == 2: pass + try: + os.unlink(abs_sock_path) + except OSError as osex: + if osex.errno == 2: + pass request.addfinalizer(kcm_teardown) return kcm_pid diff --git a/src/tests/intg/test_pam_responder.py b/src/tests/intg/test_pam_responder.py index 81fffd11818..9f5b46b0430 100644 --- a/src/tests/intg/test_pam_responder.py +++ b/src/tests/intg/test_pam_responder.py @@ -827,6 +827,7 @@ def setup_krb5(request, kdc_instance, passwd_ops_setup): passwd_ops_setup.useradd(**USER2) kdc_instance.add_principal("user1", "Secret123User1") kdc_instance.add_principal("user2", "Secret123User2") + time.sleep(2) # Give KDC time to initialize return None