func init() { route53Key = os.Getenv("AWS_ACCESS_KEY_ID") route53Secret = os.Getenv("AWS_SECRET_ACCESS_KEY") awsCredentialFile = os.Getenv("AWS_CREDENTIAL_FILE") homeDir = os.Getenv("HOME") testServer = testutil.NewHTTPServer() testServer.Start() }
. "launchpad.net/gocheck" "strings" "testing" ) func Test(t *testing.T) { TestingT(t) } type S struct { iam *iam.IAM } var _ = Suite(&S{}) var testServer = testutil.NewHTTPServer() func (s *S) SetUpSuite(c *C) { testServer.Start() auth := aws.Auth{"abc", "123", ""} s.iam = iam.New(auth, aws.Region{IAMEndpoint: testServer.URL}) } func (s *S) TearDownTest(c *C) { testServer.Flush() } func (s *S) TestCreateUser(c *C) { testServer.Response(200, nil, CreateUserExample) resp, err := s.iam.CreateUser("Bob", "/division_abc/subdivision_xyz/") values := testServer.WaitRequest().URL.Query()
func init() { route53Key = os.Getenv("AWS_ACCESS_KEY_ID") route53Secret = os.Getenv("AWS_SECRET_ACCESS_KEY") testServer = testutil.NewHTTPServer() testServer.Start() }
func init() { testServer = testutil.NewHTTPServer() testServer.Start() }