From 1b67e3aeb606e56dafd56649cfc4e94f6e3aa29c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 21 Jun 2017 18:11:59 +0200 Subject: [PATCH] Add invalid profile test to init --profile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit License: MIT Signed-off-by: Ɓukasz Magiera --- test/sharness/t0020-init.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/sharness/t0020-init.sh b/test/sharness/t0020-init.sh index 5296cb4c3..e0ee86079 100755 --- a/test/sharness/t0020-init.sh +++ b/test/sharness/t0020-init.sh @@ -127,6 +127,13 @@ test_expect_success "clean up ipfs dir" ' ' # test init profiles +test_expect_success "'ipfs init --profile' with invalid profile fails" ' + BITS="1024" && + test_must_fail ipfs init --bits="$BITS" --profile=nonexistent_profile 2> invalid_profile_out + EXPECT="Error: invalid configuration profile: nonexistent_profile" && + grep "$EXPECT" invalid_profile_out +' + test_expect_success "'ipfs init --profile' succeeds" ' BITS="1024" && ipfs init --bits="$BITS" --profile=server