func (s *S) TestGetAuthEnv(c *C) { os.Clearenv() os.Setenv("AWS_SECRET_ACCESS_KEY", "secret") os.Setenv("AWS_ACCESS_KEY_ID", "access") auth, err := aws.GetAuth("", "") c.Assert(err, IsNil) c.Assert(auth, Equals, aws.Auth{SecretKey: "secret", AccessKey: "access"}) }
func (s *S) TestGetAuthStatic(c *C) { auth, err := aws.GetAuth("access", "secret") c.Assert(err, IsNil) c.Assert(auth, Equals, aws.Auth{SecretKey: "secret", AccessKey: "access"}) }