Created
November 12, 2014 21:42
-
-
Save chriscool/454101c5aa359bdd63be to your computer and use it in GitHub Desktop.
Test for ipfs name resolution with debug commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Copyright (c) 2014 Jeromy Johnson | |
# MIT Licensed; see the LICENSE file in this repository. | |
# | |
test_description="test ipns name resolution" | |
. lib/test-lib.sh | |
test_expect_success "ipfs init succeeds" ' | |
export IPFS_DIR="$(pwd)/.go-ipfs" && | |
ipfs init -b 1024 | |
' | |
test_expect_success "'ipns name publish' succeeds" ' | |
HASH="QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o" && | |
echo $HASH > hash && | |
ipfs name publish $HASH > actual | |
' | |
test_expect_success "'ipns name publish' output looks good" ' | |
egrep "published name .* to $HASH" actual | |
' | |
echo "actual:" | |
cat actual | |
HASH2=$(cut -d \ -f 3 actual) | |
echo "HASH2: $HASH2" | |
ipfs name resolve $HASH2 >published | |
echo "result from ipfs name resolve $HASH2: $?" | |
echo "published:" | |
cat published | |
echo "hash:" | |
cat hash | |
exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That is: