@cryptotaxi247 / kubo / commits / 1fa611302

dag: test --hash option

License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>

Łukasz Magiera committed Aug 9, 2017 at 19:38 UTC 1fa61130281143e503c9cbbe47233a06c056b1f9
1 file changed +9
test/sharness/t0053-dag.sh
+9
@@ -126,6 +126,15 @@ test_dag_cmd() {
126 ipfs repo gc > /dev/null &&
127 ipfs refs -r --timeout=2s $PINHASH > /dev/null
128 '
129 +
130 + test_expect_success "can add an ipld object with sha3 hash" '
131 + IPLDHASH=$(cat ipld_object | ipfs dag put --hash sha3)
132 + '
133 +
134 + test_expect_success "output looks correct" '
135 + EXPHASH="zBwWX8u9LYZdCWqaryJW8QsBstghHSPy41nfhhFLY9qw1Vu2BWqnMFtk1jL3qCtEdGd7Kqw1HNPZv5z8LxP2eHGGDCdRE"
136 + test $EXPHASH = $IPLDHASH
137 + '
138 }
139
140 # should work offline