Skip to content

Commit

Permalink
docker: add test for ipfs version --commit
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
  • Loading branch information
Lars Gierth committed May 20, 2016
1 parent 390257c commit f4f61a5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/sharness/t0300-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ 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 &&
[ "$(cat expected | wc -c)" -gt "1" ] && # check there actually is a commit set
test_cmp expected actual
'

test_expect_success "stop docker container" '
docker_stop "$DOC_ID"
'
Expand Down

0 comments on commit f4f61a5

Please sign in to comment.