Esempio n. 1
0
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"})
}
Esempio n. 2
0
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"})
}