From db0e0b316eda630191b003e722eecae11d0e668d Mon Sep 17 00:00:00 2001 From: James Hogarth Date: Jan 30 2014 23:59:00 +0000 Subject: avoidign some cachign issues in ssd due to the rate of tests --- diff --git a/tests/p_ipa-server/7-addsudo.sh b/tests/p_ipa-server/7-addsudo.sh index fdd0a3d..03ef28e 100755 --- a/tests/p_ipa-server/7-addsudo.sh +++ b/tests/p_ipa-server/7-addsudo.sh @@ -55,10 +55,16 @@ t_Log "Running $0 - test adding sudo configuration" echo "sudoers: files sss" >> /etc/nsswitch.conf sed -i 's/services = nss, pam, ssh/services = nss, pam, ssh, sudo/' /etc/sssd/sssd.conf sed -i 's/id_provider = ipa/id_provider = ipa\nsudo_provider = ldap\nldap_sudo_search_base = ou=sudoers,dc=c6ipa,dc=local\nldap_sasl_mech = GSSAPI/' /etc/sssd/sssd.conf -/sbin/service sssd restart &> /dev/null + +t_Log "Running $0 - clearing the sssd cache" +/sbin/service sssd stop &> /dev/null +rm -rf /var/lib/sss/db/* +/sbin/service sssd start &> /dev/null /sbin/service sssd status | grep 'is running' &> /dev/null t_CheckExitStatus $? +## Leaving a little time to settle as there seems to be a slight race condition to go right away +sleep 10 t_Log "Running $0 - test sudo works" expect -f - &> /tmp/sudotestoutput.ipa-test < /dev/null rm -f /tmp/*.ipa-test