From 8357c7b13df39ddd63f65499d62b938b9e0a23fc Mon Sep 17 00:00:00 2001 From: Christian Couder <chriscool@tuxfamily.org> Date: Sun, 26 Oct 2014 09:43:41 +0100 Subject: [PATCH] Add test script for ipfs init License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org> --- test/t0020-init.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 test/t0020-init.sh diff --git a/test/t0020-init.sh b/test/t0020-init.sh new file mode 100755 index 000000000..01601420c --- /dev/null +++ b/test/t0020-init.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Copyright (c) 2014 Christian Couder +# MIT Licensed; see the LICENSE file in this repository. +# + +test_description="Test init command" + +. ./test-lib.sh + +test_expect_success "ipfs init succeeds" ' + export IPFS_DIR="$(pwd)/.go-ipfs" && + ipfs init +' + +test_expect_success ".go-ipfs/ has been created" ' + test -d ".go-ipfs" && + test -f ".go-ipfs/config" && + test -d ".go-ipfs/datastore" +' + +test_expect_success "ipfs config succeeds" ' + echo leveldb >expected && + ipfs config Datastore.Type >actual && + test_cmp expected actual +' + +test_done + -- GitLab