Add invalid profile test to init --profile
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
Łukasz Magiera committed
Jun 21, 2017 at 18:11 UTC
1b67e3aeb606e56dafd56649cfc4e94f6e3aa29c
1 file changed
+7
test/sharness/t0020-init.sh
+7
@@ -127,6 +127,13 @@ test_expect_success "clean up ipfs dir" '
127
'
128
129
# test init profiles
130
+test_expect_success "'ipfs init --profile' with invalid profile fails" '
131
+ BITS="1024" &&
132
+ test_must_fail ipfs init --bits="$BITS" --profile=nonexistent_profile 2> invalid_profile_out
133
+ EXPECT="Error: invalid configuration profile: nonexistent_profile" &&
134
+ grep "$EXPECT" invalid_profile_out
135
+'
136
+
137
test_expect_success "'ipfs init --profile' succeeds" '
138
BITS="1024" &&
139
ipfs init --bits="$BITS" --profile=server