示例#1
0
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()}
}
示例#2
0
文件: server.go 项目: fsouza/fakeaws
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 {
	}
}