mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-02 06:47:51 +08:00
commit
b4ea414c4c
1
test/.gitignore
vendored
Normal file
1
test/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
test-results/
|
||||
@ -9,12 +9,15 @@ T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
|
||||
all: clean $(T) aggregate
|
||||
|
||||
clean:
|
||||
@echo "*** $@ ***"
|
||||
-rm -r test-results
|
||||
|
||||
$(T):
|
||||
@echo "*** $@ ***"; ./$@
|
||||
@echo "*** $@ ***"
|
||||
./$@
|
||||
|
||||
aggregate:
|
||||
@echo "*** $@ ***"
|
||||
./test-aggregate-results.sh
|
||||
|
||||
.PHONY: all clean $(T) aggregate
|
||||
|
||||
29
test/t0020-init.sh
Executable file
29
test/t0020-init.sh
Executable file
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user