mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipatests: add proper timeouts to nfs.py
When tests for https://pagure.io/freeipa/issue/7918 were written no sleep interval was provided between calls to ipa-client-automount leading to random test failures. Add sleep intervals. Related-to: https://pagure.io/freeipa/issue/7918 Related-to: https://pagure.io/freeipa/issue/7988 Signed-off-by: François Cami fcami@redhat.com Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
committed by
Christian Heimes
parent
cc348b990e
commit
694c3667c7
@@ -224,6 +224,8 @@ class TestNFS(TestInit):
|
||||
'-U', '--debug'
|
||||
])
|
||||
|
||||
time.sleep(WAIT_AFTER_INSTALL)
|
||||
|
||||
# systemctl non-fatal errors will show up like this:
|
||||
# stderr=Failed to restart nfs-secure.service: \
|
||||
# Unit nfs-secure.service not found.
|
||||
@@ -239,8 +241,6 @@ class TestNFS(TestInit):
|
||||
"grep", "Domain = %s" % self.master.domain.name, "/etc/idmapd.conf"
|
||||
])
|
||||
|
||||
time.sleep(WAIT_AFTER_INSTALL)
|
||||
|
||||
automntclt.run_command([
|
||||
"mount", "-t", "nfs4", "-o", "sec=krb5p,vers=4.0",
|
||||
"%s:/exports/home" % nfssrv.hostname, "/home", "-v"
|
||||
@@ -264,6 +264,9 @@ class TestNFS(TestInit):
|
||||
'ipa-client-automount', '--location', 'default',
|
||||
'-U', '--debug', "--idmap-domain", "DNS"
|
||||
])
|
||||
|
||||
time.sleep(WAIT_AFTER_INSTALL)
|
||||
|
||||
# check whether idmapd.conf was setup properly:
|
||||
# grep must not find any configured Domain.
|
||||
result = automntclt.run_command(
|
||||
@@ -275,6 +278,8 @@ class TestNFS(TestInit):
|
||||
'ipa-client-automount', '--uninstall', '-U', '--debug'
|
||||
])
|
||||
|
||||
time.sleep(WAIT_AFTER_UNINSTALL)
|
||||
|
||||
# https://pagure.io/freeipa/issue/7918
|
||||
# test for --idmap-domain exampledomain.net
|
||||
nfs_domain = "exampledomain.net"
|
||||
@@ -287,7 +292,12 @@ class TestNFS(TestInit):
|
||||
"grep", "Domain = %s" % nfs_domain, "/etc/idmapd.conf"
|
||||
])
|
||||
|
||||
time.sleep(WAIT_AFTER_INSTALL)
|
||||
|
||||
automntclt.run_command([
|
||||
'ipa-client-automount', '--uninstall', '-U', '--debug'
|
||||
])
|
||||
|
||||
time.sleep(WAIT_AFTER_UNINSTALL)
|
||||
|
||||
self.cleanup()
|
||||
|
||||
Reference in New Issue
Block a user