From 5bda53e55ba9f0b93b33f7489d5bdd60ce748a66 Mon Sep 17 00:00:00 2001 From: Lars Gierth Date: Sat, 2 Jul 2016 22:05:07 +0200 Subject: [PATCH 1/2] docker: take version suffixes like -dev into account The double and single quotes got too damn complicated, so heredoc we go! License: MIT Signed-off-by: Lars Gierth --- test/sharness/t0300-docker-image.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test/sharness/t0300-docker-image.sh b/test/sharness/t0300-docker-image.sh index 98998bf3a..644a368c7 100755 --- a/test/sharness/t0300-docker-image.sh +++ b/test/sharness/t0300-docker-image.sh @@ -66,13 +66,16 @@ test_expect_success "simple ipfs add/cat can be run in docker container" ' test_cmp expected actual ' -test_expect_success "version CurrentCommit is set" ' - docker_exec "$DOC_ID" "wget --retry-connrefused --waitretry=1 --timeout=30 -t 30 \ - -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 expected && # check there actually is a commit set +read testcode <actual ; \ + test -s actual ; \ + docker exec -i "$DOC_ID" ipfs version --enc json \ + | sed 's/^.*"Commit":"\\\([^"]*\\\)".*$/\\\1/g' >expected ; \ + test -s expected ; \ test_cmp expected actual -' +EOF +test_expect_success "version CurrentCommit is set" "$testcode" test_expect_success "stop docker container" ' docker_stop "$DOC_ID" From afda38f201d44c02afc78566a41e373b98358c6b Mon Sep 17 00:00:00 2001 From: Lars Gierth Date: Sat, 2 Jul 2016 22:08:50 +0200 Subject: [PATCH 2/2] test: really no need for relative path to gx deps License: MIT Signed-off-by: Lars Gierth --- test/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Makefile b/test/Makefile index 26b8b5b1b..11c380814 100644 --- a/test/Makefile +++ b/test/Makefile @@ -7,7 +7,7 @@ RANDOM_FILES_SRC = ../Godeps/_workspace/src/github.com/jbenet/go-random-files POLLENDPOINT_SRC= ../thirdparty/pollEndpoint GOSLEEP_SRC = ./dependencies/go-sleep -GX_RELATIVE_PATH = ../../../../gx/ipfs +GX_RELATIVE_PATH = gx/ipfs export PATH := ../bin:${PATH}