mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-29 17:36:38 +08:00
Merge pull request #2937 from ipfs/feature/docker-dev-suffix
docker: take -dev version suffix into account
This commit is contained in:
@ -7,7 +7,7 @@ RANDOM_FILES_SRC = ../Godeps/_workspace/src/github.com/jbenet/go-random-files
|
|||||||
POLLENDPOINT_SRC= ../thirdparty/pollEndpoint
|
POLLENDPOINT_SRC= ../thirdparty/pollEndpoint
|
||||||
GOSLEEP_SRC = ./dependencies/go-sleep
|
GOSLEEP_SRC = ./dependencies/go-sleep
|
||||||
|
|
||||||
GX_RELATIVE_PATH = ../../../../gx/ipfs
|
GX_RELATIVE_PATH = gx/ipfs
|
||||||
|
|
||||||
export PATH := ../bin:${PATH}
|
export PATH := ../bin:${PATH}
|
||||||
|
|
||||||
|
@ -66,13 +66,16 @@ test_expect_success "simple ipfs add/cat can be run in docker container" '
|
|||||||
test_cmp expected actual
|
test_cmp expected actual
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success "version CurrentCommit is set" '
|
read testcode <<EOF
|
||||||
docker_exec "$DOC_ID" "wget --retry-connrefused --waitretry=1 --timeout=30 -t 30 \
|
docker exec -i "$DOC_ID" wget --retry-connrefused --waitretry=1 --timeout=30 -t 30 \
|
||||||
-q -O - http://localhost:8080/version" | grep Commit | cut -d" " -f2 >actual &&
|
-q -O - http://localhost:8080/version | grep Commit | cut -d" " -f2 >actual ; \
|
||||||
docker_exec "$DOC_ID" "ipfs version --commit" | cut -d- -f2 >expected &&
|
test -s actual ; \
|
||||||
test -s expected && # check there actually is a commit set
|
docker exec -i "$DOC_ID" ipfs version --enc json \
|
||||||
|
| sed 's/^.*"Commit":"\\\([^"]*\\\)".*$/\\\1/g' >expected ; \
|
||||||
|
test -s expected ; \
|
||||||
test_cmp expected actual
|
test_cmp expected actual
|
||||||
'
|
EOF
|
||||||
|
test_expect_success "version CurrentCommit is set" "$testcode"
|
||||||
|
|
||||||
test_expect_success "stop docker container" '
|
test_expect_success "stop docker container" '
|
||||||
docker_stop "$DOC_ID"
|
docker_stop "$DOC_ID"
|
||||||
|
Reference in New Issue
Block a user