plugins/portmap: fix test flake

The source address selection was random, and sometimes we picked a
source address that the container didn't have a route to. Adding a
default route fixes that!
This commit is contained in:
Casey Callendrello
2017-07-06 14:54:53 +02:00
parent e7328869fa
commit 3745ee2d3f
2 changed files with 19 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ func TestPortmap(t *testing.T) {
RunSpecs(t, "portmap Suite")
}
// OpenEchoServer opens a server that handles one connection before closing.
// OpenEchoServer opens a server that listens until closeChan is closed.
// It opens on a random port and sends the port number on portChan when
// the server is up and running. If an error is encountered, closes portChan.
// If closeChan is closed, closes the socket.