From cb7d09642205cba07ef614065d106f7f84d8921b Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud Date: Tue, 13 Oct 2020 12:19:13 +0200 Subject: [PATCH] ipatests: properly handle journalctl return code The test test_installation.py::TestInstallMaster::test_selinux_avcs is failing when no AVCs are detected because it is calling journalctl --full --grep=AVC--since=yesterday and the command exits with return code 1. Call the command with raiseonerr=False to support this case. Fixes: https://pagure.io/freeipa/issue/8541 Reviewed-By: Mohammad Rizwan Yusuf Reviewed-By: Francois Cami --- ipatests/test_integration/test_installation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipatests/test_integration/test_installation.py b/ipatests/test_integration/test_installation.py index f66c1477d..1e0b3182a 100644 --- a/ipatests/test_integration/test_installation.py +++ b/ipatests/test_integration/test_installation.py @@ -902,7 +902,7 @@ class TestInstallMaster(IntegrationTest): # installed by default and journalctl gives us all AVCs. result = self.master.run_command([ "journalctl", "--full", "--grep=AVC", "--since=yesterday" - ]) + ], raiseonerr=False) avcs = list( line.strip() for line in result.stdout_text.split('\n') if "AVC avc:" in line