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