X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fmrstub%2Fbasic_test.sh;h=582c36f3a7d49bd8be4e673fcedb682e1edeb935;hb=663566c28930429775ea9921f0e32ddf5253da28;hp=8b2347dc127f37e9f13734c8f86350c1388fd919;hpb=5a7560b9906f08ba2a47daace7da78484188aed7;p=nonrtric.git diff --git a/test/mrstub/basic_test.sh b/test/mrstub/basic_test.sh index 8b2347dc..582c36f3 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 @@ -164,6 +164,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