X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=near-rt-ric-simulator%2Ftest%2FSTD_1.1.3%2Fbasic_test.sh;h=7dbe131dc31f72bfa5b9a2990935e8b155f011a5;hb=109f3f55a3f0eaac94a9b6954fe2f3db611a991d;hp=9274eaa4956ba21dd91d1d888379463417590196;hpb=b11c353b98286b79e7a74d20e6e36042fd789fba;p=sim%2Fa1-interface.git diff --git a/near-rt-ric-simulator/test/STD_1.1.3/basic_test.sh b/near-rt-ric-simulator/test/STD_1.1.3/basic_test.sh index 9274eaa..7dbe131 100755 --- a/near-rt-ric-simulator/test/STD_1.1.3/basic_test.sh +++ b/near-rt-ric-simulator/test/STD_1.1.3/basic_test.sh @@ -17,8 +17,28 @@ # ============LICENSE_END================================================= # -#Default port for the simulator -PORT=8085 +# Script for basic test of the simulator. +# Run the build_and_start with the same arg as this script +if [ $# -ne 1 ]; then + echo "Usage: ./basic_test.sh nonsecure|secure" + exit 1 +fi +if [ "$1" != "nonsecure" ] && [ "$1" != "secure" ]; then + echo "Usage: ./basic_test.sh nonsecure|secure" + exit 1 +fi + +if [ $1 == "nonsecure" ]; then + #Default http port for the simulator + PORT=8085 + # Set http protocol + HTTPX="http" +else + #Default https port for the simulator + PORT=8185 + # Set https protocol + HTTPX="https" +fi . ../common/test_common.sh @@ -77,7 +97,7 @@ do_curl PUT /A1-P/v1/policies/pi2 201 jsonfiles/pi2.json echo "=== API: Update policy instance pi2 ===" RESULT="json:{\"scope\": {\"ueId\": \"ue2\", \"groupId\": \"group2\", \"sliceId\": \"slice2\", \"qosId\": \"qos2\", \"cellId\": \"cell2\"}, \"statement\": {\"priorityLevel\": 10}}" -do_curl PUT '/A1-P/v1/policies/pi2?notificationDestination=http://localhost:8085/statustest' 200 jsonfiles/pi2.json +do_curl PUT '/A1-P/v1/policies/pi2?notificationDestination='$HTTPX'://localhost:'$PORT'/statustest' 200 jsonfiles/pi2.json echo "=== API: Get policy instances, shall contain pi1 and pi2==" RESULT="json:[ \"pi1\", \"pi2\" ]" @@ -143,6 +163,10 @@ echo "=== Get counter: interface ===" RESULT="STD_1.1.3" do_curl GET /counter/interface 200 +echo "=== Get counter: remote hosts ===" +RESULT="*" +do_curl GET '/counter/remote_hosts' 200 + echo "********************" echo "*** All tests ok ***" echo "********************"