aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-03-12 17:22:39 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2023-03-12 17:22:39 +0100
commit233151bdd444bbedbd0328503fc4851d894023bc (patch)
treecb2f0a45e75c52c0014a5cce868a49580fc7908f
parenttest: refactoring (diff)
downloadwg-api-web-233151bdd444bbedbd0328503fc4851d894023bc.tar.gz
wg-api-web-233151bdd444bbedbd0328503fc4851d894023bc.zip
check_api.sh: refactoring
-rwxr-xr-xtest/check_api.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/check_api.sh b/test/check_api.sh
index 4dcc199..1eb0c45 100755
--- a/test/check_api.sh
+++ b/test/check_api.sh
@@ -3,8 +3,10 @@
set -o errexit -o nounset -o pipefail
shopt -s inherit_errexit lastpipe
+readonly base_url='http://192.168.177.1:1234/'
+
run_curl() {
- curl -sS -D - --connect-timeout 3 http://192.168.177.1:1234/ "$@"
+ curl -sS -D - --connect-timeout 3 "$@" -- "$base_url"
}
run_curl_api() {
@@ -30,4 +32,4 @@ main() {
check_api
}
-main "$@"
+main