func (s *LocalServer) SetUp(c *C) { srv, err := iamtest.NewServer() c.Assert(err, IsNil) c.Assert(srv, NotNil) s.srv = srv s.region = aws.Region{IAMEndpoint: srv.URL()} }
func main() { server, err := iamtest.NewServer() if err != nil { log.Fatalf("Failed to start server: %s.", err) } defer server.Quit() fmt.Printf("Server is listening at %s.\nPress Ctrl-C to close it.\n", server.URL()) for { } }