X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=near-rt-ric-simulator%2Ftest%2Fcommon%2Ftest_common.sh;h=6c669c1110e928586ff19afd344f78bcb351480f;hb=91a399ace5df7b6599fa9288e9a356e1466ecd62;hp=b142ce8b1c5f5bd13173588710465f79ef8ecab6;hpb=21be2e0c890fb9604d0add2942fcff19b6fe2fb2;p=sim%2Fa1-interface.git diff --git a/near-rt-ric-simulator/test/common/test_common.sh b/near-rt-ric-simulator/test/common/test_common.sh index b142ce8..6c669c1 100755 --- a/near-rt-ric-simulator/test/common/test_common.sh +++ b/near-rt-ric-simulator/test/common/test_common.sh @@ -19,6 +19,9 @@ # Function to execute curl and compare + print result +# Note: Env var PORT must be set to the intended port number +# Notre Env var HTTPX must be set to either 'http' or 'https' + #args: [file] #Expects the env $RESULT to contain the expected RESULT. #If json, the RESULT shall begin with 'json:'. @@ -29,7 +32,7 @@ do_curl() { echo "Exiting test script....." exit 1 fi - curlstr="curl -X "$1" -sw %{http_code} localhost:"${PORT}${2}" -H accept:*/*" + curlstr="curl -X "$1" -skw %{http_code} $HTTPX://localhost:"${PORT}${2}" -H accept:*/*" if [ $# -gt 3 ]; then curlstr=$curlstr" -H Content-Type:application/json --data-binary @"$4 fi