Use python command rather than python3 to allow cross distribution test

This commit is contained in:
Damien Metzler 2017-04-21 15:13:37 +02:00
parent 555f5db5e5
commit 64dab4a002
1 changed files with 4 additions and 4 deletions

View File

@ -23,9 +23,9 @@ get() {
"http://nuxeo:8080/nuxeo/api/v1/$1"
}
python3() {
python() {
docker run --rm -i \
--entrypoint python3 \
--entrypoint python \
"$image" \
"$@"
}
@ -38,10 +38,10 @@ PATH1='default-domain/workspaces'
"get 'path/$PATH1'"
# First get a document by its path to get its id
DUID="$(get "path/$PATH1" | python3 -c 'import json, sys; obj = json.load(sys.stdin); print(obj["uid"]);')"
DUID="$(get "path/$PATH1" | python -c 'import json, sys; obj = json.load(sys.stdin); print(obj["uid"]);')"
# Then get the same document by its id
PATH2="$(get "id/$DUID" | python3 -c 'import json, sys; obj = json.load(sys.stdin); print(obj["path"]);')"
PATH2="$(get "id/$DUID" | python -c 'import json, sys; obj = json.load(sys.stdin); print(obj["path"]);')"
# Compare both path
[ "/$PATH1" = "$PATH2" ]