Updated image tags for tests
[nonrtric.git] / test / mrstub / basic_test.sh
index dbd4297..6e854ea 100755 (executable)
@@ -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