Commit 5e9cbd74 authored by Chris Sasarak's avatar Chris Sasarak

Added tests for ipfs --version.

1. Test that ipfs --version has a 0 exit status
2. Check the ipfs --version output matches ipfs version

License: MIT
Signed-off-by: default avatarChris Sasarak <chris.sasarak@gmail.com>
parent b59e2710
......@@ -16,11 +16,24 @@ test_expect_success "ipfs version succeeds" '
ipfs version >version.txt
'
test_expect_success "ipfs --version success" '
ipfs --version ||
test_fsh ipfs --version
'
test_expect_success "ipfs version output looks good" '
egrep "^ipfs version [0-9]+\.[0-9]+\.[0-9]" version.txt >/dev/null ||
test_fsh cat version.txt
'
test_expect_success "ipfs versions matches ipfs --version" '
ipfs version > version.txt &&
ipfs --version > version2.txt &&
diff version2.txt version.txt ||
test_fsh ipfs --version
'
test_expect_success "ipfs version --all has all required fields" '
ipfs version --all > version_all.txt &&
grep "go-ipfs version" version_all.txt &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment