From d0a97464415946d8a61ee78c6c01e52190b8a791 Mon Sep 17 00:00:00 2001
From: Sergey Orlov <sorlov@redhat.com>
Date: Tue, 21 Sep 2021 16:57:59 +0200
Subject: [PATCH 1/2] ipatests: check for message in sssd log only during
 actual test action

Get size of the log file immediately before main test action to avoid
capturing messages written to log during environment preparation.

Fixes https://pagure.io/freeipa/issue/8987
---
 ipatests/test_integration/test_trust.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index e6312d7925b..fcc813c5cb5 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -268,9 +268,6 @@ def test_extdom_plugin(self):
 
         client = self.clients[0]
         tasks.backup_file(self.master, paths.SSSD_CONF)
-        log_file = '{0}/sssd_{1}.log'.format(paths.VAR_LOG_SSSD_DIR,
-                                             client.domain.name)
-        logsize = len(client.get_file_contents(log_file))
         res = self.master.run_command(['pidof', 'sssd_be'])
         pid = res.stdout_text.strip()
         test_id = 'id testuser@%s' % self.ad_domain
@@ -292,6 +289,10 @@ def test_extdom_plugin(self):
         self.master.run_command(remove_cache)
         client.run_command(remove_cache)
 
+        log_file = '{0}/sssd_{1}.log'.format(paths.VAR_LOG_SSSD_DIR,
+                                             client.domain.name)
+        logsize = len(client.get_file_contents(log_file))
+
         try:
             # stop sssd_be, needed to simulate a timeout in the extdom plugin.
             stop_sssdbe = self.master.run_command('kill -STOP %s' % pid)

From 70c784b0a4d3b23f9d3e8a392a2da37dd3d03097 Mon Sep 17 00:00:00 2001
From: Sergey Orlov <sorlov@redhat.com>
Date: Fri, 1 Oct 2021 15:49:50 +0200
Subject: [PATCH 2/2] temp commit

---
 .freeipa-pr-ci.yaml                        |  2 +-
 ipatests/prci_definitions/temp_commit.yaml | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/.freeipa-pr-ci.yaml b/.freeipa-pr-ci.yaml
index abcf8c5b634..80656690080 120000
--- a/.freeipa-pr-ci.yaml
+++ b/.freeipa-pr-ci.yaml
@@ -1 +1 @@
-ipatests/prci_definitions/gating.yaml
\ No newline at end of file
+ipatests/prci_definitions/temp_commit.yaml
\ No newline at end of file
diff --git a/ipatests/prci_definitions/temp_commit.yaml b/ipatests/prci_definitions/temp_commit.yaml
index cc5737a8488..5f691dadbcb 100644
--- a/ipatests/prci_definitions/temp_commit.yaml
+++ b/ipatests/prci_definitions/temp_commit.yaml
@@ -73,3 +73,15 @@ jobs:
         template: *ci-master-f27
         timeout: 3600
         topology: *master_1repl_1client
+
+  fedora-27/test_trust:
+    requires: [fedora-27/build]
+    priority: 50
+    job:
+      class: RunADTests
+      args:
+        build_url: '{fedora-27/build_url}'
+        test_suite: test_integration/test_trust.py
+        template: *ci-master-f27
+        timeout: 9000
+        topology: *adroot_adchild_adtree_master_1client
