More test script examples

This commit is contained in:
jmjatlanta 2017-09-27 06:16:18 -05:00
parent daf715929a
commit 058a1d64ab
2 changed files with 25 additions and 0 deletions

22
test/scripts/test_2.sh Executable file
View file

@ -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
}

View file

@ -0,0 +1,3 @@
function create_hello_world {
echo 'Hello, World!' > hello.txt
}