From 2ae58bf9b5eda40f152074a6f10d2fe019426755 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Tue, 10 Apr 2012 13:12:36 +0000 Subject: [PATCH] Use multiple identities for testing. Regression test for #92766 --- .../LB/tests/lb-test-changeacl.sh | 55 +++++++++++++++------- 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/org.glite.testsuites.ctb/LB/tests/lb-test-changeacl.sh b/org.glite.testsuites.ctb/LB/tests/lb-test-changeacl.sh index 9f4bcdf..63a10c3 100755 --- a/org.glite.testsuites.ctb/LB/tests/lb-test-changeacl.sh +++ b/org.glite.testsuites.ctb/LB/tests/lb-test-changeacl.sh @@ -101,6 +101,7 @@ change_acl() ##################### identity="ThisIsJustATestingIdentity" +identwity="ThisIsanotherTestingIdentity" { test_start @@ -142,6 +143,18 @@ while [ "$CONT" = "yes" ]; do test_done fi + check_srv_version '>=' "2.3" + if [ $? -gt 0 ]; then + identities="$identity $identwity" + test_done + else + test_tag_acl="yes" + printf "Multiple identities will be tested: Regression into Savannah Bug #92766..." + identities="$identity" + test_done + fi + + printf "Testing Tags permissions... " if [ "$test_tag_acl" != "yes" ]; then printf "Capability not detected..." @@ -162,19 +175,21 @@ while [ "$CONT" = "yes" ]; do test_done printf "Changing ACL..." - change_acl "$jobid" "ADD" "READ" $identity - if [ $? -ne 0 ]; then - test_failed - break; - fi - - if [ "$test_tag_acl" = "yes" ]; then - change_acl "$jobid" "ADD" "TAG" $identity + for i in $identities; do + change_acl "$jobid" "ADD" "READ" $i if [ $? -ne 0 ]; then test_failed - break + break; fi - fi + + if [ "$test_tag_acl" = "yes" ]; then + change_acl "$jobid" "ADD" "TAG" $i + if [ $? -ne 0 ]; then + test_failed + break + fi + fi + done test_done printf "Checking ACL for new values... " @@ -182,10 +197,12 @@ while [ "$CONT" = "yes" ]; do [ "$test_tag_acl" = "yes" ] && ops="$ops write" res=0 for operation in $ops; do - $LBJOBSTATUS $jobid | grep -E "^acl :.*dn:${identity}<${operation}/>" > /dev/null - if [ $? -ne 0 ]; then - res=1 - fi + for i in $identities; do + $LBJOBSTATUS $jobid | grep -E "^acl :.*dn:${i}<${operation}/>" > /dev/null + if [ $? -ne 0 ]; then + res=1 + fi + done done if [ $res -ne 0 ]; then test_failed @@ -200,10 +217,12 @@ while [ "$CONT" = "yes" ]; do [ "$test_tag_acl" = "yes" ] && perms="$perms TAG" res=0 for p in $perms; do - change_acl "${jobid}" "REMOVE" $p $identity - if [ $? -ne 0 ]; then - res=1 - fi + for i in $identities; do + change_acl "${jobid}" "REMOVE" $p $i + if [ $? -ne 0 ]; then + res=1 + fi + done done if [ $res -ne 0 ]; then test_failed -- 1.8.2.3