From b255057b8dc61f4dd9657ffe31c81cd6e109e527 Mon Sep 17 00:00:00 2001 From: mmusich Date: Fri, 16 Jul 2021 12:03:39 +0200 Subject: [PATCH] fix test_getPayloadData in case there've been recent changes in the plugins definitions --- CondCore/Utilities/test/test_getPayloadData.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CondCore/Utilities/test/test_getPayloadData.sh b/CondCore/Utilities/test/test_getPayloadData.sh index 5ce534148722e..cb4f74c51c2f5 100755 --- a/CondCore/Utilities/test/test_getPayloadData.sh +++ b/CondCore/Utilities/test/test_getPayloadData.sh @@ -9,10 +9,12 @@ check_for_failure() { } check_for_full(){ - count=`echo ${@} | python3 -c 'import json,sys;print(len(json.load(sys.stdin)["cond::BasicPayload"]))'` - if [[ $count -gt 1 ]] + count=`echo ${@} | python3 -c 'import json,sys;data=json.load(sys.stdin);print(len(data.keys()))'` + echo $count + if [[ $count -gt 0 ]] then - echo -e "\n ---> passed getPayloadData.py --discover test : found $count entries" + entries=`echo ${@} | python3 -c 'import json,sys;data=json.load(sys.stdin);print(list(data.keys()))'` + echo -e "\n ---> passed getPayloadData.py --discover test : found $count entries: $entries" else echo -e "getPayloadData.py --discover test not passed... found no entries" exit 1