Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Add docker-compose file for ECS"
[nonrtric.git]
/
test
/
common
/
api_curl.sh
diff --git
a/test/common/api_curl.sh
b/test/common/api_curl.sh
index
2aff131
..
611fc4d
100644
(file)
--- a/
test/common/api_curl.sh
+++ b/
test/common/api_curl.sh
@@
-40,6
+40,11
@@
__do_curl_to_api() {
__RESTBASE=$ECS_RESTBASE
__RESTBASE_SECURE=$ECS_RESTBASE_SECURE
__RETRY_CODES=$ECS_RETRY_CODES
__RESTBASE=$ECS_RESTBASE
__RESTBASE_SECURE=$ECS_RESTBASE_SECURE
__RETRY_CODES=$ECS_RETRY_CODES
+ elif [ $1 == "CR" ]; then
+ __ADAPTER=$CR_ADAPTER
+ __RESTBASE=$CR_RESTBASE
+ __RESTBASE_SECURE=$CR_RESTBASE_SECURE
+ __RETRY_CODES=""
else
paramError=1
fi
else
paramError=1
fi
@@
-97,7
+102,7
@@
__do_curl_to_api() {
if [ $paramError -eq 1 ]; then
((RES_CONF_FAIL++))
if [ $paramError -eq 1 ]; then
((RES_CONF_FAIL++))
- echo "-Incorrect number of parameters to __do_curl_
agent
" $@ >> $HTTPLOG
+ echo "-Incorrect number of parameters to __do_curl_
to_api
" $@ >> $HTTPLOG
echo "-Expected: (PA|ECS GET|PUT|POST|DELETE|GET_BATCH|PUT_BATCH|POST_BATCH|DELETE_BATCH <url> [<file>]) | (PA|ECS RESPONSE <correlation-id>)" >> $HTTPLOG
echo "-Returning response 000" >> $HTTPLOG
echo "-000"
echo "-Expected: (PA|ECS GET|PUT|POST|DELETE|GET_BATCH|PUT_BATCH|POST_BATCH|DELETE_BATCH <url> [<file>]) | (PA|ECS RESPONSE <correlation-id>)" >> $HTTPLOG
echo "-Returning response 000" >> $HTTPLOG
echo "-000"
@@
-150,6
+155,8
@@
__do_curl_to_api() {
payload="$(cat $4 | tr -d '\n' | tr -d ' ' )"
echo "payload: "$payload >> $HTTPLOG
file=" --data-binary "$payload
payload="$(cat $4 | tr -d '\n' | tr -d ' ' )"
echo "payload: "$payload >> $HTTPLOG
file=" --data-binary "$payload
+ elif [ $# -eq 4 ]; then
+ echo " FILE: $(cat $4)" >> $HTTPLOG
fi
#urlencode the request url since it will be carried by send-request url
requestUrl=$(python3 -c "from __future__ import print_function; import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))" "$3")
fi
#urlencode the request url since it will be carried by send-request url
requestUrl=$(python3 -c "from __future__ import print_function; import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))" "$3")