提交 42455d27 作者: Jeromy

multistream tests use data from file

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