github.com/zignig/go-ipfs@v0.0.0-20141111235910-c9e5fdf55a52/test/t0020-init.sh (about) 1 #!/bin/sh 2 # 3 # Copyright (c) 2014 Christian Couder 4 # MIT Licensed; see the LICENSE file in this repository. 5 # 6 7 test_description="Test init command" 8 9 . lib/test-lib.sh 10 11 test_expect_success "ipfs init succeeds" ' 12 export IPFS_DIR="$(pwd)/.go-ipfs" && 13 ipfs init 14 ' 15 16 test_expect_success ".go-ipfs/ has been created" ' 17 test -d ".go-ipfs" && 18 test -f ".go-ipfs/config" && 19 test -d ".go-ipfs/datastore" 20 ' 21 22 test_expect_success "ipfs config succeeds" ' 23 echo leveldb >expected && 24 ipfs config Datastore.Type >actual && 25 test_cmp expected actual 26 ' 27 28 test_done 29