mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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 Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
@@ -571,9 +571,6 @@ class TestTrust(BaseTestTrust):
|
||||
|
||||
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
|
||||
@@ -595,6 +592,10 @@ class TestTrust(BaseTestTrust):
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user