From 4a4c078b806a31e313d4dc02f7d0bf1ceb4011a4 Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Wed, 19 May 2021 12:17:23 +0300 Subject: [PATCH] ipatests: Suppress list trust or certificates There are tons of useless information in test's runner log on server uninstallation about list trust and certificates, such as: ``` RUN ['trust', 'list'] pkcs11:id=%D2%87%B4%E3%DF%37%27%93%55%F6%56%EA%81%E5%36%CC%8C%1E%3F%BD;type=cert type: certificate label: ACCVRAIZ1 trust: anchor category: authority pkcs11:id=%F7%7D%C5%FD%C4%E8%9A%1B%77%64%A7%F5%1D%A0%CC%BF%87%60%9A%6D;type=cert type: certificate label: AC RAIZ FNMT-RCM trust: anchor category: authority pkcs11:id=%52%D8%88%3A%C8%9F%78%66%ED%89%F3%7B%38%70%94%C9%02%02%36%D0;type=cert type: certificate label: Actalis Authentication Root CA trust: anchor category: authority ... ``` This improves the readability of test logs. Reviewed-By: Alexander Bokovoy --- ipatests/pytest_ipa/integration/tasks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ipatests/pytest_ipa/integration/tasks.py b/ipatests/pytest_ipa/integration/tasks.py index be5522371..61402bc0d 100755 --- a/ipatests/pytest_ipa/integration/tasks.py +++ b/ipatests/pytest_ipa/integration/tasks.py @@ -1069,7 +1069,9 @@ def uninstall_master(host, ignore_topology_disconnect=True, raiseonerr=False).returncode == 1 assert host.run_command(['test', '-f', paths.IPA_P11_KIT], raiseonerr=False).returncode == 1 - assert "IPA CA" not in host.run_command(['trust', 'list']).stdout_text + assert "IPA CA" not in host.run_command( + ["trust", "list"], log_stdout=False + ).stdout_text if clean: Firewall(host).disable_services(["freeipa-ldap", "freeipa-ldaps",