test: fix the socat tests after the ubuntu 24.04 upgrade (#10683)
(cherry picked from commit 29bfcce4bebf7b0dcaf2d5e1b3e042a85cb49c69)
Piotr Galar committed
Jan 29, 2025 at 21:11 UTC
c5e9015cf0d01c9f39e8f76238b531fcad2fd5e5
2 files changed
+4
-4
test/sharness/t0060-daemon.sh
+3
-3
@@ -131,21 +131,21 @@ test_expect_success "ipfs help output looks good" '
131
# check transport is encrypted by default and no plaintext is allowed
132
133
test_expect_success SOCAT "default transport should support encryption (TLS, needs socat )" '
134
- socat - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-tls &&
134
+ socat -s - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-tls &&
135
grep -q "/tls" swarmnc &&
136
test_must_fail grep -q "na" swarmnc ||
137
test_fsh cat swarmnc
138
'
139
140
test_expect_success SOCAT "default transport should support encryption (Noise, needs socat )" '
141
- socat - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-noise &&
141
+ socat -s - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-noise &&
142
grep -q "/noise" swarmnc &&
143
test_must_fail grep -q "na" swarmnc ||
144
test_fsh cat swarmnc
145
'
146
147
test_expect_success SOCAT "default transport should not support plaintext (needs socat )" '
148
- socat - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-plaintext &&
148
+ socat -s - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-plaintext &&
149
grep -q "na" swarmnc &&
150
test_must_fail grep -q "/plaintext" swarmnc ||
151
test_fsh cat swarmnc
test/sharness/t0061-daemon-opts.sh
+1
-1
@@ -18,7 +18,7 @@ apiaddr=$API_ADDR
18
19
# Odd. this fails here, but the inverse works on t0060-daemon.
20
test_expect_success SOCAT 'transport should be unencrypted ( needs socat )' '
21
- socat - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-plaintext &&
21
+ socat -s - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-plaintext &&
22
grep -q "/plaintext" swarmnc &&
23
test_must_fail grep -q "na" swarmnc ||
24
test_fsh cat swarmnc