X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fcr%2Fbasic_test.sh;h=44e8526aa48aae7ae3e870b8c7c3905970ac9cdf;hb=1b732d17463fad74721391b3a87a2a12172da63c;hp=d0bf25d3168bdf63c2cf27636eef0269e49311a2;hpb=f5f7331122df85bc31039a7fd1e862d9cb0b3e4d;p=nonrtric.git diff --git a/test/cr/basic_test.sh b/test/cr/basic_test.sh index d0bf25d3..44e8526a 100755 --- a/test/cr/basic_test.sh +++ b/test/cr/basic_test.sh @@ -65,6 +65,10 @@ echo "=== Get counter - current events ===" RESULT="0" do_curl GET /counter/current_messages 200 +echo "=== Get counter - remote hosts ===" +RESULT="*" +do_curl GET /counter/remote_hosts 200 + echo "=== Send a request non json ===" RESULT="*" #create payload @@ -235,6 +239,32 @@ RESULT="0" do_curl GET /counter/current_messages 200 +# Check delay + +echo "=== Set delay 10 sec===" +RESULT="*" +do_curl POST /forcedelay?delay=10 200 + +TSECONDS=$SECONDS +echo "=== Send a request, dealyed ===" +RESULT="*" +#create payload +echo "{\"DATA-MSG\":\"msg-del1\"}" > .tmp.json +do_curl POST '/callbacks/test' 200 .tmp.json + +if [ $(($SECONDS-$TSECONDS)) -lt 10 ]; then + echo " Delay failed $(($SECONDS-$TSECONDS))" + echo " Exiting...." + exit 1 +else + echo " Delay OK $(($SECONDS-$TSECONDS))" +fi + + +echo "=== Fetch an event ===" +RESULT="json:{\"DATA-MSG\":\"msg-del1\"}" +do_curl GET '/get-event/test' 200 + echo "********************" echo "*** All tests ok ***" echo "********************"