consul/command
Daniel Nephin e8312d6b5a 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
..
acl re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
agent agent: refactor the agent delegate interface to be partition friendly (#11429) 2021-10-26 15:08:55 -05:00
catalog re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
cli cmd: introduce a shim to expose Stdout/Stderr writers 2021-06-02 16:51:34 -04:00
config Support Check-And-Set deletion of config entries (#11419) 2021-11-01 16:42:01 +00:00
connect re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
debug debug: use human readable dates for filenames 2021-08-18 13:06:57 -04:00
event testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
exec Replace use of 'sane' where appropriate 2021-07-02 12:18:46 -04:00
flags add partition flag to catalog commands (#10949) 2021-08-27 16:34:45 -04:00
forceleave partitions: various refactors to support partitioning the serf LAN pool (#11568) 2021-11-15 09:51:14 -06:00
helpers Centralized Config CLI (#5731) 2019-04-30 16:27:16 -07:00
info testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
intention Support partitions in connect expose cmd 2021-11-12 14:45:32 -07:00
join partitions: various refactors to support partitioning the serf LAN pool (#11568) 2021-11-15 09:51:14 -06:00
keygen Update default gossip encryption key size to 32 bytes 2019-07-30 09:45:41 -06:00
keyring partitions: various refactors to support partitioning the serf LAN pool (#11568) 2021-11-15 09:51:14 -06:00
kv KV refactoring, part 2 (#11512) 2021-11-08 11:43:21 -05:00
leave testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
lock re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
login testing: remove unnecessary calls to freeport 2021-11-29 12:19:43 -05:00
logout testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
maint Fix maint test 2021-07-30 12:58:46 -04:00
members partitions: various refactors to support partitioning the serf LAN pool (#11568) 2021-11-15 09:51:14 -06:00
monitor fix monitor to only start the monitor in json format when requested (#10358) 2021-06-07 12:08:48 -04:00
operator testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
reload testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
rtt agent: ensure that most agent behavior correctly respects partition configuration (#10880) 2021-08-19 15:09:42 -05:00
services Fixup to support unix domain socket via command line (#10758) 2021-08-12 10:05:22 -07:00
snapshot testing: remove unnecessary calls to freeport 2021-11-29 12:19:43 -05:00
tls introduce certopts (#9606) 2021-03-22 10:16:41 +01:00
validate config: replace calls to config.NewBuilder with config.Load 2021-01-27 17:34:43 -05:00
version add v to version pretty formatter (#8341) 2020-07-20 17:43:10 -04:00
watch cli: Test API access using /status/leader in consul watch (#10795) 2021-08-09 09:00:33 -07:00
commands_oss.go debug: restore cancel on SigInt 2021-08-18 12:29:34 -04:00
registry.go debug: restore cancel on SigInt 2021-08-18 12:29:34 -04:00