diff --git a/test/scripts/test_2.sh b/test/scripts/test_2.sh new file mode 100755 index 0000000..67ba9ec --- /dev/null +++ b/test/scripts/test_2.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +source ./test_helpers.sh + +IPFS="../../main/ipfs --config /tmp/ipfs_1" + +function pre { + eval "$IPFS" init; +} + +function post { + rm -Rf /tmp/ipfs_1; + rm hello.txt; +} + +function body { + create_hello_world; + eval "$IPFS" add hello.txt + eval "$IPFS" object cat Qm123456 +} + + diff --git a/test/scripts/test_helpers.sh b/test/scripts/test_helpers.sh new file mode 100644 index 0000000..51ed721 --- /dev/null +++ b/test/scripts/test_helpers.sh @@ -0,0 +1,3 @@ +function create_hello_world { + echo 'Hello, World!' > hello.txt +}