diff --git a/test/sharness/t0060-daemon.sh b/test/sharness/t0060-daemon.sh index e0aff7b5edf6b8bab7fe6ee45b7cb1ab30042cea..eaffe6384c15a28a4f5fde0a426d72b534d6df9f 100755 --- a/test/sharness/t0060-daemon.sh +++ b/test/sharness/t0060-daemon.sh @@ -8,6 +8,8 @@ test_description="Test daemon command" . lib/test-lib.sh +# TODO: randomize ports here once we add --config to ipfs daemon + # this needs to be in a different test than "ipfs daemon --init" below test_expect_success "setup IPFS_PATH" ' IPFS_PATH="$(pwd)/.ipfs" && @@ -91,6 +93,16 @@ test_expect_success "ipfs help output looks good" ' test_fsh cat help.txt ' +# check transport is encrypted + +test_expect_success 'transport should be encrypted' ' + nc localhost 4001 >swarmnc & + go-sleep 0.1s && + grep -q "AES-256,AES-128" swarmnc && + ! grep -q "/ipfs/identify" swarmnc || + test_fsh cat swarmnc +' + # end same as in t0010 test_expect_success "daemon is still running" '