open-consul/connect
Daniel Nephin 4f0d092c95 testing: remove unnecessary calls to freeport
Previously we believe it was necessary for all code that required ports
to use freeport to prevent conflicts.

https://github.com/dnephin/freeport-test shows that it is actually save
to use port 0 (`127.0.0.1:0`) as long as it is passed directly to
`net.Listen`, and the listener holds the port for as long as it is
needed.

This works because freeport explicitly avoids the ephemeral port range,
and port 0 always uses that range. As you can see from the test output
of https://github.com/dnephin/freeport-test, the two systems never use
overlapping ports.

This commit converts all uses of freeport that were being passed
directly to a net.Listen to use port 0 instead. This allows us to remove
a bit of wrapping we had around httptest, in a couple places.
2021-11-29 12:19:43 -05:00
..
certgen Fix support for RSA CA keys in Connect. (#6638) 2019-11-01 13:20:26 +00:00
proxy testing: remove unnecessary calls to freeport 2021-11-29 12:19:43 -05:00
example_test.go connect.Service based implementation after review feedback. 2018-06-14 09:41:56 -07:00
resolver.go oss portion of ent #1069 (#10883) 2021-08-20 12:57:45 -04:00
resolver_test.go testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
service.go Allow passing ALPN next protocols down to connect services. Fixes #4466. (#9920) 2021-03-26 11:34:47 +00:00
service_test.go testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
testing.go testing: use the new freeport interfaces 2021-11-27 15:39:46 -05:00
tls.go ci: go-test-race switch to exclude list 2020-11-11 14:44:57 -05:00
tls_test.go testing: slightly better comparison for x509.CertPool 2021-05-06 13:47:16 -04:00