X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fmrstub%2Fbasic_test.sh;h=6e854ead36b533ae1d65eb8734d5d8ca8810cc11;hb=c8f92e94bb2638aa66a1d7c2ba63375bbfcdc8c9;hp=8b2347dc127f37e9f13734c8f86350c1388fd919;hpb=f45eedd18774bf9856800b43387bee3fa2e6152d;p=nonrtric.git diff --git a/test/mrstub/basic_test.sh b/test/mrstub/basic_test.sh index 8b2347dc..6e854ead 100755 --- a/test/mrstub/basic_test.sh +++ b/test/mrstub/basic_test.sh @@ -31,12 +31,12 @@ fi if [ $1 == "nonsecure" ]; then #Default http port for the simulator - PORT=3905 + PORT=3904 # Set http protocol HTTPX="http" else #Default https port for the mr-stub - PORT=3906 + PORT=3905 # Set https protocol HTTPX="https" fi @@ -44,6 +44,8 @@ fi # source function to do curl and check result . ../common/do_curl_function.sh +RESP_CONTENT='*' #Dont check resp content type + echo "=== Stub hello world ===" RESULT="OK" do_curl GET / 200 @@ -164,6 +166,17 @@ echo "=== Fetch a response ===" RESULT="test2-response200" do_curl GET '/receive-response?correlationid='$CORRID 200 + +echo "=== Send a json response ===" +# Create minimal accepted response message, array +echo "{\"correlationId\": \""$CORRID"\", \"message\": {\"test\":\"testresponse\"}, \"status\": \"200\"}" > .tmp.json +RESULT="{}" +do_curl POST /events/generic-path 200 .tmp.json + +echo "=== Fetch a request ===" +RESULT="json:[\"{\\\"correlationId\\\": \\\""$CORRID"\\\", \\\"message\\\": {\\\"test\\\": \\\"testresponse\\\"}, \\\"status\\\": \\\"200\\\"}\"]" +do_curl GET '/events/generic-path' 200 + echo "********************" echo "*** All tests ok ***" echo "********************" \ No newline at end of file