Fix test to properly work with TLS 1.3
In TLS 1.3, the client finishes the handshake so we don't get an error immediately.
We need to read from connection to get error.
@@ -1090,7 +1090,11 @@ var _ = Describe("[rfe_id:393][crit:high][vendor:cnv-qe@redhat.com][level:system
stopChan := make(chan struct{})
defer close(stopChan)
Expect(tests.ForwardPorts(handler, []string{fmt.Sprintf("4321%d:%d", i, port)}, stopChan, 10*time.Second)).To(Succeed())
- _, err = tls.Dial("tcp", fmt.Sprintf("localhost:4321%d", i), tlsConfig)
+ conn, err := tls.Dial("tcp", fmt.Sprintf("localhost:4321%d", i), tlsConfig)
+ if conn != nil {
+ b := make([]byte, 1)
+ _, err = conn.Read(b)
+ }
Expect(err).To(HaveOccurred())
errors <- err
}(i, portI)
