@cryptotaxi247 / kubo / commits / 7145d306b

docker: add test for ipfs version --commit

License: MIT Signed-off-by: Lars Gierth <larsg@systemli.org>

Lars Gierth committed May 18, 2016 at 22:10 UTC 7145d306b4882b673e52e9f75e623e9cfb579490
1 file changed +8
test/sharness/t0300-docker-image.sh
+8
@@ -66,6 +66,14 @@ test_expect_success "simple ipfs add/cat can be run in docker container" '
66 test_cmp expected actual
67 '
68
69 +test_expect_success "version CurrentCommit is set" '
70 + docker_exec "$DOC_ID" "wget --retry-connrefused --waitretry=1 --timeout=30 -t 30 \
71 + -q -O - http://localhost:8080/version" | grep Commit | cut -d" " -f2 >actual &&
72 + docker_exec "$DOC_ID" "ipfs version --commit" | cut -d- -f2 >expected &&
73 + [ "$(cat expected | wc -c)" -gt "1" ] && # check there actually is a commit set
74 + test_cmp expected actual
75 +'
76 +
77 test_expect_success "stop docker container" '
78 docker_stop "$DOC_ID"
79 '