Skip to content

Commit 38bff3e

Browse files
author
Gauvain Pocentek
committed
Prepare for v4 API testing
1 parent ac3aef6 commit 38bff3e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tools/build_test_env.sh

+9-1
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ fatal() { error "$@"; exit 1; }
2626
try() { "$@" || fatal "'$@' failed"; }
2727

2828
PY_VER=2
29-
while getopts :p: opt "$@"; do
29+
API_VER=3
30+
while getopts :p:a: opt "$@"; do
3031
case $opt in
3132
p) PY_VER=$OPTARG;;
33+
a) API_VER=$OPTARG;;
3234
:) fatal "Option -${OPTARG} requires a value";;
3335
'?') fatal "Unknown option: -${OPTARG}";;
3436
*) fatal "Internal error: opt=${opt}";;
@@ -41,6 +43,11 @@ case $PY_VER in
4143
*) fatal "Wrong python version (2 or 3)";;
4244
esac
4345

46+
case $API_VER in
47+
3|4) ;;
48+
*) fatal "Wrong API version (3 or 4)";;
49+
esac
50+
4451
for req in \
4552
curl \
4653
docker \
@@ -130,6 +137,7 @@ timeout = 10
130137
[local]
131138
url = http://localhost:8080
132139
private_token = $TOKEN
140+
api_version = $API_VER
133141
EOF
134142

135143
log "Config file content ($CONFIG):"

0 commit comments

Comments
 (0)