提交 e3223a07 作者: Juan Batiz-Benet

dockertest: logging niceness

上级 0b0ca408
ipfs bootstrap add /ip4/$BOOTSTRAP_PORT_4011_TCP_ADDR/tcp/$BOOTSTRAP_PORT_4011_TCP_PORT/QmNXuBh8HFsWq68Fid8dMbGNQTh7eG6hV9rr1fQyfmfomE
echo "dockertest> starting client daemon"
ipfs daemon &
sleep 3
while [ ! -f /data/idtiny ]
do
echo waiting for server to add the file...
echo "dockertest> waiting for server to add the file..."
sleep 1
done
echo client found file with hash: $(cat /data/idtiny)
echo "dockertest> client found file with hash:" $(cat /data/idtiny)
ipfs cat $(cat /data/idtiny) > filetiny
......@@ -23,10 +25,10 @@ fi
while [ ! -f /data/idrand ]
do
echo waiting for server to add the file...
echo "dockertest> waiting for server to add the file..."
sleep 1
done
echo client found file with hash: $(cat /data/idrand)
echo "dockertest> client found file with hash:" $(cat /data/idrand)
cat /data/idrand
......@@ -44,4 +46,4 @@ if (($? > 0)); then
exit 1
fi
echo "success"
echo "dockertest> success"
......@@ -3,6 +3,7 @@ ipfs bootstrap add /ip4/$BOOTSTRAP_PORT_4011_TCP_ADDR/tcp/$BOOTSTRAP_PORT_4011_T
# wait for daemon to start/bootstrap
# alternatively use ipfs swarm connect
echo "dockertest> starting server daemon"
ipfs daemon &
sleep 3
# TODO instead of bootrapping: ipfs swarm connect /ip4/$BOOTSTRAP_PORT_4011_TCP_ADDR/tcp/$BOOTSTRAP_PORT_4011_TCP_PORT/QmNXuBh8HFsWq68Fid8dMbGNQTh7eG6hV9rr1fQyfmfomE
......@@ -10,11 +11,11 @@ sleep 3
# must mount this volume from data container
ipfs add -q /data/filetiny > tmptiny
mv tmptiny /data/idtiny
echo added tiny file. hash is $(cat /data/idtiny)
echo "dockertest> added tiny file. hash is" $(cat /data/idtiny)
ipfs add -q /data/filerand > tmprand
mv tmprand /data/idrand
echo added rand file. hash is $(cat /data/idrand)
echo "dockertest> added rand file. hash is" $(cat /data/idrand)
# allow ample time for the client to pull the data
sleep 10000000
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论