Skip to content

Commit

Permalink
fix: use -s option for curl and use proxy url var
Browse files Browse the repository at this point in the history
  • Loading branch information
bubbajoe committed Apr 21, 2024
1 parent ad379a8 commit f7d9f50
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 342 deletions.
2 changes: 1 addition & 1 deletion functional-tests/admin_tests/merge_responses_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ dgate-cli route create \
preserveHost:=true \
namespace=test-ns #\ service='base_svc'

curl ${PROXY_URL}/hello -H Host:test.com
curl -s ${PROXY_URL}/hello -H Host:test.com

echo "Merge Responses Test Passed"
2 changes: 1 addition & 1 deletion functional-tests/admin_tests/modify_request_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dgate-cli route create \
namespace=modify_request_test-ns \
service='base_svc'

curl http://localhost/modify_request_test \
curl -s ${PROXY_URL}/modify_request_test \
-H Host:modify_request_test.com \
-H X-Forwarded-For:1.1.1.1

Expand Down
4 changes: 2 additions & 2 deletions functional-tests/admin_tests/url_shortener_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ dgate-cli route create \
preserveHost:=true \
namespace=url_shortener-ns #\ service='base_svc'

JSON_RESP=$(curl -G -X POST -H Host:url_shortener.com ${PROXY_URL}/test --data-urlencode 'url=${PROXY_URL}/hello')
JSON_RESP=$(curl -sG -X POST -H Host:url_shortener.com ${PROXY_URL}/test --data-urlencode 'url=${PROXY_URL}/hello')
echo $JSON_RESP

URL_ID=$(echo $JSON_RESP | jq -r '.id')

curl ${PROXY_URL}/test\?id\=$URL_ID -H Host:url_shortener.com
curl -s ${PROXY_URL}/test\?id\=$URL_ID -H Host:url_shortener.com
Loading

0 comments on commit f7d9f50

Please sign in to comment.