Flaky test in TestListenAndServeRejectsPlainConnectionsWhenProxyProtocolEnabled
From: https://gitlab.com/gitlab-org/gitlab-shell/-/jobs/1771369027
time="2021-11-10T23:24:19Z" level=info msg="Proxy protocol is enabled" correlation_id=
time="2021-11-10T23:24:19Z" level=info msg="Listening for SSH connections" correlation_id= tcp_address="127.0.0.1:50000"
time="2021-11-10T23:24:19Z" level=info msg="server: handleConn: start" correlation_id=01FM62N7ENYS9GQY39E1ZHGBN9 remote_addr="127.0.0.1:55554"
time="2021-11-10T23:24:19Z" level=error msg="server: handleConn: failed to initialize SSH connection" correlation_id=01FM62N7ENYS9GQY39E1ZHGBN9 error="proxyproto: proxy protocol signature not present" remote_addr="127.0.0.1:55554"
--- FAIL: TestListenAndServeRejectsPlainConnectionsWhenProxyProtocolEnabled (0.01s)
sshd_test.go:60:
Error Trace: sshd_test.go:60
Error: Not equal:
expected: "ssh: handshake failed: read tcp 127.0.0.1:55554->127.0.0.1:50000: read: connection reset by peer"
actual : "ssh: handshake failed: EOF"
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-ssh: handshake failed: read tcp 127.0.0.1:55554->127.0.0.1:50000: read: connection reset by peer
+ssh: handshake failed: EOF
Test: TestListenAndServeRejectsPlainConnectionsWhenProxyProtocolEnabled
Maybe we need to relax this test expectation a bit? I can't tell if the read
here is just a race.