c-ipfs/test/scripts/test_2.sh

28 lines
411 B
Bash
Raw Normal View History

2017-09-27 11:16:18 +00:00
#!/bin/bash
source ./test_helpers.sh
IPFS="../../main/ipfs --config /tmp/ipfs_1"
function pre {
2017-09-27 12:40:55 +00:00
post
2017-09-27 11:16:18 +00:00
eval "$IPFS" init;
check_failure "pre" $?
2017-09-27 11:16:18 +00:00
}
function post {
rm -Rf /tmp/ipfs_1;
rm hello.txt;
}
function body {
create_hello_world;
eval "$IPFS" add hello.txt
2017-09-27 12:40:55 +00:00
check_failure "add hello.txt" $?
eval "$IPFS" cat QmYAXgX8ARiriupMQsbGXtKdDyGzWry1YV3sycKw1qqmgH
2017-09-27 12:40:55 +00:00
check_failure "cat hello.txt" $?
2017-09-27 11:16:18 +00:00
}