From 6c929bae24532089f541734f456952e746e1e6d2 Mon Sep 17 00:00:00 2001 From: James Hogarth Date: Mar 16 2015 00:44:30 +0000 Subject: update tests for centos 7.1 - kerberos keyring now uses kernel secure keyring functionality and ipa-client-install configures sudo using sssd by default --- diff --git a/tests/p_ipa-server/3-verify_kerberos_tickets.sh b/tests/p_ipa-server/3-verify_kerberos_tickets.sh index cda2f63..dc2d03f 100755 --- a/tests/p_ipa-server/3-verify_kerberos_tickets.sh +++ b/tests/p_ipa-server/3-verify_kerberos_tickets.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -x # Author: James Hogarth # @@ -18,7 +18,7 @@ t_Log "Running $0 - testing admin user kerberos principal" kdestroy &> /dev/null -klist 2>&1 | grep "No credentials" &> /dev/null +klist 2>&1 | grep -E "(No credentials|Credentials cache .* not found)" &> /dev/null t_CheckExitStatus $? diff --git a/tests/p_ipa-server/4-adduser.sh b/tests/p_ipa-server/4-adduser.sh index 1fc6b53..5ee880f 100755 --- a/tests/p_ipa-server/4-adduser.sh +++ b/tests/p_ipa-server/4-adduser.sh @@ -8,7 +8,7 @@ then # Need admin credentials kdestroy &> /dev/null -klist 2>&1 | grep "No credentials" &> /dev/null +klist 2>&1 | grep -E "(No credentials|Credentials cache .* not found)" &> /dev/null t_CheckExitStatus $? diff --git a/tests/p_ipa-server/5-addservice.sh b/tests/p_ipa-server/5-addservice.sh index 6ffdd63..01370a7 100755 --- a/tests/p_ipa-server/5-addservice.sh +++ b/tests/p_ipa-server/5-addservice.sh @@ -8,7 +8,7 @@ then # Need admin credentials kdestroy &> /dev/null -klist 2>&1 | grep "No credentials" &> /dev/null +klist 2>&1 | grep -E "(No credentials|Credentials cache .* not found)" &> /dev/null t_CheckExitStatus $? diff --git a/tests/p_ipa-server/6-dnsdetails.sh b/tests/p_ipa-server/6-dnsdetails.sh index 086e738..fc01f9f 100755 --- a/tests/p_ipa-server/6-dnsdetails.sh +++ b/tests/p_ipa-server/6-dnsdetails.sh @@ -8,7 +8,7 @@ then # Need admin credentials kdestroy &> /dev/null -klist 2>&1 | grep "No credentials" &> /dev/null +klist 2>&1 | grep -E "(No credentials|Credentials cache .* not found)" &> /dev/null t_CheckExitStatus $? @@ -66,7 +66,7 @@ t_Log "Running $0 - Regression test of RHBA-2103-0739" for i in {1..30} do service named reload &> /dev/null -service named status &> /dev/null || t_CheckExitStatus $? +service named status | grep running &> /dev/null || t_CheckExitStatus $? sleep 1 done diff --git a/tests/p_ipa-server/7-addsudo.sh b/tests/p_ipa-server/7-addsudo.sh index 6f98f29..011cbe5 100755 --- a/tests/p_ipa-server/7-addsudo.sh +++ b/tests/p_ipa-server/7-addsudo.sh @@ -51,15 +51,6 @@ t_CheckExitStatus $? echo "$sudodetails" | grep 'Users: ipatestuser' &> /dev/null t_CheckExitStatus $? -# EL6.6 auto configures sudo but 7 does not -if t_GetPkgRel basesystem | grep -q el7 -then -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 -fi - t_Log "Running $0 - clearing the sssd cache" /sbin/service sssd stop &> /dev/null rm -rf /var/lib/sss/db/*