- testVerbLength=$(jq '.testVerb | length')
- for (( idx=0; idx<testVerbLength; idx++ )) do
- testVerb[$idx]=$(jq -r ".testVerb[$idx].uid" ${CFGFILE})
- done
+ testVerbLength=$(jq '.testVerb|length' $CFGFILE)
+ if [ "$VERBSELECTED" = "*" ]
+ then
+ # Get all the verbs of the test api
+ for (( idx=0; idx<testVerbLength; idx++ )) do
+ testVerb[$idx]=$(jq -r ".testVerb[$idx].uid" ${CFGFILE})
+ done
+ else
+ # You search for a exact matching verb so there should be only one match
+ for (( idx=0; idx<testVerbLength; idx++ )) do
+ [ "$(jq -r ".testVerb[$idx].uid" ${CFGFILE})" = "$VERBSELECTED" ] && \
+ testVerb[0]=$(jq -r ".testVerb[$idx].uid" ${CFGFILE})
+ done
+ fi