Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Use Lombok to add builder to EiJob
[nonrtric.git]
/
test
/
common
/
ricsimulator_api_functions.sh
diff --git
a/test/common/ricsimulator_api_functions.sh
b/test/common/ricsimulator_api_functions.sh
index
f003559
..
56f968e
100644
(file)
--- a/
test/common/ricsimulator_api_functions.sh
+++ b/
test/common/ricsimulator_api_functions.sh
@@
-22,17
+22,15
@@
# Excute a curl cmd towards a ricsimulator and check the response code.
# Excute a curl cmd towards a ricsimulator and check the response code.
-# args: <expected-response-code> <curl-cmd-string>
[<file>]
+# args: <expected-response-code> <curl-cmd-string>
__execute_curl_to_sim() {
echo ${FUNCNAME[1]} "line: "${BASH_LINENO[1]} >> $HTTPLOG
echo " CMD: $2" >> $HTTPLOG
__execute_curl_to_sim() {
echo ${FUNCNAME[1]} "line: "${BASH_LINENO[1]} >> $HTTPLOG
echo " CMD: $2" >> $HTTPLOG
- if [ $# -eq 3 ]; then
- echo " FILE: $(<$3)" >> $HTTPLOG
- fi
res="$($2)"
echo " RESP: $res" >> $HTTPLOG
retcode=$?
if [ $retcode -ne 0 ]; then
res="$($2)"
echo " RESP: $res" >> $HTTPLOG
retcode=$?
if [ $retcode -ne 0 ]; then
+ ((RES_CONF_FAIL++))
echo " RETCODE: "$retcode
echo -e $RED" FAIL - fatal error when executing curl."$ERED
return 1
echo " RETCODE: "$retcode
echo -e $RED" FAIL - fatal error when executing curl."$ERED
return 1
@@
-43,6
+41,7
@@
__execute_curl_to_sim() {
return 0
fi
echo -e $RED" FAIL - expected http response: "$1" but got http response: "$status $ERED
return 0
fi
echo -e $RED" FAIL - expected http response: "$1" but got http response: "$status $ERED
+ ((RES_CONF_FAIL++))
return 1
}
return 1
}
@@
-118,11
+117,11
@@
sim_put_policy_type() {
curlString="curl -X PUT -skw %{http_code} $RIC_SIM_LOCALHOST"$res"/policytype?id="$3" -H Content-Type:application/json --data-binary @"$4
curlString="curl -X PUT -skw %{http_code} $RIC_SIM_LOCALHOST"$res"/policytype?id="$3" -H Content-Type:application/json --data-binary @"$4
- __execute_curl_to_sim $1 "$curlString"
$4
+ __execute_curl_to_sim $1 "$curlString"
return $?
}
return $?
}
-#
D
Simulator API: Delete a policy type in a ric
+# Simulator API: Delete a policy type in a ric
# <response-code> <ric-id> <policy-type-id>
# (Function for test scripts)
sim_delete_policy_type() {
# <response-code> <ric-id> <policy-type-id>
# (Function for test scripts)
sim_delete_policy_type() {