提交 3148f4c3 作者: Jeromy

fix tests that check swarm port knocking

License: MIT
Signed-off-by: 's avatarJeromy <jeromyj@gmail.com>
上级 8f3a51ac
......@@ -81,9 +81,9 @@ test_expect_success "nc is available" '
# check transport is encrypted
test_expect_success "transport should be encrypted" '
nc -w 5 localhost $SWARM_PORT >swarmnc &&
grep -q "AES-256,AES-128" swarmnc &&
test_must_fail grep -q "/multistream/1.0.0" swarmnc ||
printf "\x13/multistream/1.0.0\n\3ls\n" | nc -q1 localhost $SWARM_PORT > swarmnc &&
grep -q "/secio" swarmnc &&
test_must_fail grep -q "/plaintext/1.0.0" swarmnc ||
test_fsh cat swarmnc
'
......
......@@ -27,9 +27,9 @@ test_expect_success 'api gateway should be unrestricted' '
# Odd. this fails here, but the inverse works on t0060-daemon.
test_expect_success 'transport should be unencrypted' '
go-sleep 0.5s | nc localhost "$SWARM_PORT" >swarmnc &&
test_must_fail grep -q "AES-256,AES-128" swarmnc &&
grep -q "/multistream/1.0.0" swarmnc ||
printf "\x13/multistream/1.0.0\n\3ls\n" | nc -q 1 localhost $SWARM_PORT > swarmnc &&
test_must_fail grep -q "/secio" swarmnc &&
grep -q "/plaintext" swarmnc ||
test_fsh cat swarmnc
'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论