Skip to content

Commit

Permalink
Merge branch 'socat-ubuntu-noble' of https://github.com/ipfs/kubo int…
Browse files Browse the repository at this point in the history
…o fix/9364-validation
  • Loading branch information
gsergey418alt committed Jan 29, 2025
2 parents 354256a + 12a0185 commit c546382
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/sharness/t0060-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/sharness/t0061-daemon-opts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c546382

Please sign in to comment.