t0060-daemon: test transport is encrypted
License: MIT Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
Juan Batiz-Benet committed
Jun 19, 2015 at 05:13 UTC
748d25f473d05076e1f1de0d75d939c54a41c160
1 file changed
+12
test/sharness/t0060-daemon.sh
+12
@@ -8,6 +8,8 @@ test_description="Test daemon command"
8
9
. lib/test-lib.sh
10
11
+# TODO: randomize ports here once we add --config to ipfs daemon
12
+
13
# this needs to be in a different test than "ipfs daemon --init" below
14
test_expect_success "setup IPFS_PATH" '
15
IPFS_PATH="$(pwd)/.ipfs" &&
@@ -91,6 +93,16 @@ test_expect_success "ipfs help output looks good" '
93
test_fsh cat help.txt
94
'
95
96
+# check transport is encrypted
97
+
98
+test_expect_success 'transport should be encrypted' '
99
+ nc localhost 4001 >swarmnc &
100
+ go-sleep 0.1s &&
101
+ grep -q "AES-256,AES-128" swarmnc &&
102
+ ! grep -q "/ipfs/identify" swarmnc ||
103
+ test_fsh cat swarmnc
104
+'
105
+
106
# end same as in t0010
107
108
test_expect_success "daemon is still running" '