mirror of
https://github.com/moby/moby.git
synced 2026-07-07 23:28:37 +00:00
It was added so that tests could replace it before it was picked up and used by a new network's PortMapper, so that tests were isolated from each other. Now the PortMapper is not used by the bridge driver, neither is driver's portAllocator. Instead of replacing the driver.portAllocator in tests, reset the singleton instance using its ReleaseAll(). Un-export portallocator.NewInstance, now the tests aren't using it. Signed-off-by: Rob Murray <rob.murray@docker.com>