From df67f3d1bd308aa2f98e1b415520d2d024fdbc36 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Tue, 10 Jan 2017 17:22:23 +0100 Subject: [PATCH] test: add test for invalid routing option License: MIT Signed-off-by: Jakub Sztandera --- test/sharness/t0061-daemon-opts.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/sharness/t0061-daemon-opts.sh b/test/sharness/t0061-daemon-opts.sh index ba8385fb2..131a425f5 100755 --- a/test/sharness/t0061-daemon-opts.sh +++ b/test/sharness/t0061-daemon-opts.sh @@ -39,4 +39,14 @@ test_expect_success 'gateway should work in offline mode' ' ' test_kill_ipfs_daemon + +test_expect_success 'daemon should not start with bad dht opt' ' + test_must_fail ipfs daemon --routing=fdsfdsfds > daemon_output 2>&1 +' + +test_expect_success 'output contains info about dht option' ' + grep "unrecognized routing option:" daemon_output || + test_fsh cat daemon_output +' + test_done