fix: add udp/ prefix to Caddy L4 UDP listen addresses and fix E2E test selectors

- Fix Caddy L4 config to use "udp/:PORT" listen syntax for UDP proxy hosts
  (previously used bare ":PORT" which Caddy treated as TCP)
- Fix TCP unused port test to check data echo instead of connection refusal
  (Docker port mapping accepts TCP handshake even without a Caddy listener)
- Fix mTLS import test to wait for sheet close and scope cert name to table
- Fix CA certificate generate test to scope name assertion to table
- Remaining L4 routing test failures are infrastructure issues with Docker
  port forwarding and Caddy L4 UDP listener startup timing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
fuomag9
2026-03-22 22:37:39 +01:00
parent 68db449b7c
commit 7261fa24d8
3 changed files with 17 additions and 6 deletions

View File

@@ -47,9 +47,11 @@ test.describe.serial('L4 TCP Proxy Routing', () => {
expect(connected).toBe(true);
});
test('unused TCP port does not accept connections', async () => {
const connected = await tcpConnect('127.0.0.1', TCP_PORT_2, 2000);
expect(connected).toBe(false);
test('unused TCP port does not echo data back', async () => {
// Docker accepts the TCP connection at the container level even without a Caddy listener,
// but no data should be proxied/echoed back since there's no L4 host configured on this port.
const res = await tcpSend('127.0.0.1', TCP_PORT_2, 'probe', 2000);
expect(res.data).not.toContain('probe');
});
test('disabled TCP proxy host stops accepting connections', async ({ page }) => {