diff --git a/tests/p_ipa-server/0-install_freeipa.sh b/tests/p_ipa-server/0-install_freeipa.sh index f9c7419..d20fb5a 100755 --- a/tests/p_ipa-server/0-install_freeipa.sh +++ b/tests/p_ipa-server/0-install_freeipa.sh @@ -2,7 +2,12 @@ # Author: James Hogarth # +if (t_GetPkgRel basesystem | grep -q el6) +then t_Log "Running $0 - Installing packages" t_InstallPackage ipa-server bind-dyndb-ldap +else + echo "Skipped on CentOS 5" +fi diff --git a/tests/p_ipa-server/1-configure_freeipa.sh b/tests/p_ipa-server/1-configure_freeipa.sh index f85e161..799d6b4 100755 --- a/tests/p_ipa-server/1-configure_freeipa.sh +++ b/tests/p_ipa-server/1-configure_freeipa.sh @@ -1,12 +1,16 @@ #!/bin/bash # Author: James Hogarth # +if (t_GetPkgRel basesystem | grep -q el6) +then t_Log "Configuring IPA server" - - ipa-server-install -U --hostname=c6test.c6ipa.local --ip-address=$(ip a s dev eth0 | awk '$0 ~ /scope global eth0/ {print $2}' | cut -d'/' -f 1) -r C6IPA.LOCAL -n c6ipa.local -p p455w0rd -a p455w0rd --ssh-trust-dns --setup-dns --forwarder=$(awk '$0 ~ /nameserver/ {print $2}' /etc/resolv.conf | head -n 1) t_CheckExitStatus $? +else + echo "Skipped on CentOS 5" +fi + diff --git a/tests/p_ipa-server/2-verify_kerberos_tickets.sh b/tests/p_ipa-server/2-verify_kerberos_tickets.sh index fc926a2..94444fd 100755 --- a/tests/p_ipa-server/2-verify_kerberos_tickets.sh +++ b/tests/p_ipa-server/2-verify_kerberos_tickets.sh @@ -2,6 +2,9 @@ # Author: James Hogarth # +if (t_GetPkgRel basesystem | grep -q el6) +then + # kinit cannot take password from stdin so use expect t_InstallPackage expect @@ -33,5 +36,7 @@ klist | grep "admin@C6IPA.LOCAL" &> /dev/null t_CheckExitStatus $? +else + echo "Skipped on CentOS 5" +fi -# MORE STUFF GOES HERE diff --git a/tests/p_ipa-server/3-adduser.sh b/tests/p_ipa-server/3-adduser.sh index 34637cd..78b6e02 100755 --- a/tests/p_ipa-server/3-adduser.sh +++ b/tests/p_ipa-server/3-adduser.sh @@ -2,6 +2,9 @@ # Author: James Hogarth # +if (t_GetPkgRel basesystem | grep -q el6) +then + # Need admin credentials kdestroy &> /dev/null @@ -74,5 +77,8 @@ t_CheckExitStatus $? kdestroy &> /dev/null +else + echo "Skipped on CentOS 5" +fi diff --git a/tests/p_ipa-server/4-addservice.sh b/tests/p_ipa-server/4-addservice.sh index b8af8a9..f539627 100755 --- a/tests/p_ipa-server/4-addservice.sh +++ b/tests/p_ipa-server/4-addservice.sh @@ -2,6 +2,9 @@ # Author: James Hogarth # +if (t_GetPkgRel basesystem | grep -q el6) +then + # Need admin credentials kdestroy &> /dev/null @@ -72,5 +75,8 @@ t_Log "Running $0 - verifying certificate against CA" openssl verify -CAfile /etc/ipa/ca.crt /etc/pki/tls/certs/testservice.crt | grep "/etc/pki/tls/certs/testservice.crt: OK" &> /dev/null t_CheckExitStatus $? +else + echo "Skipped on CentOS 5" +fi diff --git a/tests/p_ipa-server/5-dnsdetails.sh b/tests/p_ipa-server/5-dnsdetails.sh index a662970..b8ed6f3 100755 --- a/tests/p_ipa-server/5-dnsdetails.sh +++ b/tests/p_ipa-server/5-dnsdetails.sh @@ -2,6 +2,9 @@ # Author: James Hogarth # +if (t_GetPkgRel basesystem | grep -q el6) +then + # Need admin credentials kdestroy &> /dev/null @@ -69,3 +72,7 @@ done t_CheckExitStatus $? +else + echo "Skipped on CentOS 5" +fi +