mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
test: fix the socat tests after the ubuntu 24.04 upgrade (#10683)
(cherry picked from commit 29bfcce4be)
This commit is contained in:
parent
4c23919a20
commit
c5e9015cf0
@ -131,21 +131,21 @@ test_expect_success "ipfs help output looks good" '
|
||||
# check transport is encrypted by default and no plaintext is allowed
|
||||
|
||||
test_expect_success SOCAT "default transport should support encryption (TLS, needs socat )" '
|
||||
socat - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-tls &&
|
||||
socat -s - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-tls &&
|
||||
grep -q "/tls" swarmnc &&
|
||||
test_must_fail grep -q "na" swarmnc ||
|
||||
test_fsh cat swarmnc
|
||||
'
|
||||
|
||||
test_expect_success SOCAT "default transport should support encryption (Noise, needs socat )" '
|
||||
socat - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-noise &&
|
||||
socat -s - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-noise &&
|
||||
grep -q "/noise" swarmnc &&
|
||||
test_must_fail grep -q "na" swarmnc ||
|
||||
test_fsh cat swarmnc
|
||||
'
|
||||
|
||||
test_expect_success SOCAT "default transport should not support plaintext (needs socat )" '
|
||||
socat - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-plaintext &&
|
||||
socat -s - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-plaintext &&
|
||||
grep -q "na" swarmnc &&
|
||||
test_must_fail grep -q "/plaintext" swarmnc ||
|
||||
test_fsh cat swarmnc
|
||||
|
||||
@ -18,7 +18,7 @@ apiaddr=$API_ADDR
|
||||
|
||||
# Odd. this fails here, but the inverse works on t0060-daemon.
|
||||
test_expect_success SOCAT 'transport should be unencrypted ( needs socat )' '
|
||||
socat - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-plaintext &&
|
||||
socat -s - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-plaintext &&
|
||||
grep -q "/plaintext" swarmnc &&
|
||||
test_must_fail grep -q "na" swarmnc ||
|
||||
test_fsh cat swarmnc
|
||||
|
||||
Loading…
Reference in New Issue
Block a user