-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #211 from chriscool/improve_tests
Improve tests
- Loading branch information
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test-results/ |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|