提交 5bda53e5 作者: Lars Gierth

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: 's avatarLars Gierth <larsg@systemli.org>
上级 4fa85cc4
......@@ -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 <<EOF
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 ; \
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"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论