Skip to content

Commit 7f23abf

Browse files
sanityclaude
andcommitted
ci: enable Docker NAT for six-peer regression test when available
Enable Docker NAT simulation in the six-peer regression test to provide more realistic test coverage for NAT traversal and gateway connections. This ensures that peers run behind simulated NAT routers while gateways are on the public network, matching production deployment topology. The test now checks if Docker is available before enabling Docker NAT mode, falling back to local mode if Docker is not accessible on the runner. Fixes #2204 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b10ac2e commit 7f23abf

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,18 @@ jobs:
162162
env:
163163
FREENET_CORE_PATH: ${{ github.workspace }}
164164
RUST_LOG: info
165-
run: >
166-
cargo test --test message_flow
167-
river_message_flow_over_freenet_six_peers_five_rounds
168-
-- --ignored --exact
165+
# Use Docker NAT to simulate realistic network topology where peers
166+
# are behind NAT and gateways are on the public network. This provides
167+
# better test coverage for NAT traversal and gateway connection code paths.
168+
# See issue #2204 for context. Only enable if Docker is accessible.
169+
run: |
170+
if docker info >/dev/null 2>&1; then
171+
echo "Docker available - using Docker NAT backend"
172+
export FREENET_TEST_DOCKER_NAT=1
173+
else
174+
echo "Docker not available - using local backend"
175+
fi
176+
cargo test --test message_flow river_message_flow_over_freenet_six_peers_five_rounds -- --ignored --exact
169177
170178
ubertest:
171179
name: Ubertest

0 commit comments

Comments
 (0)