added Addr() to test server Signed-off-by: Alex Suraci <asuraci@pivotal.io>
diff --git a/ghttp/test_server.go b/ghttp/test_server.go index 1e5afc8..4bbb2e4 100644 --- a/ghttp/test_server.go +++ b/ghttp/test_server.go
@@ -182,6 +182,11 @@ return s.HTTPTestServer.URL } +//Addr() returns the address on which the server is listening. +func (s *Server) Addr() string { + return s.HTTPTestServer.Listener.Addr().String() +} + //Close() should be called at the end of each test. It spins down and cleans up the test server. func (s *Server) Close() { s.writeLock.Lock()