func (s *credentialsSuite) TestServicePrincipalSecretCredentialsValid(c *gc.C) { envtesting.AssertProviderCredentialsValid(c, s.provider, "service-principal-secret", map[string]string{ "application-id": "application", "application-password": "******", "subscription-id": "subscription", }) }
func (s *credentialsSuite) TestUserPassCredentialsValid(c *gc.C) { envtesting.AssertProviderCredentialsValid(c, s.provider, "userpass", map[string]string{ "username": "******", "password": "******", "tenant-name": "gary", }) }
func (s *credentialsSuite) TestAccessKeyCredentialsValid(c *gc.C) { envtesting.AssertProviderCredentialsValid(c, s.provider, "access-key", map[string]string{ "access-key": "key", "secret-key": "secret", "tenant-name": "gary", }) }
func (s *credentialsSuite) TestOAuth2CredentialsValid(c *gc.C) { envtesting.AssertProviderCredentialsValid(c, s.provider, "oauth2", map[string]string{ "client-id": "123", "client-email": "*****@*****.**", "project-id": "fourfivesix", "private-key": "sewen", }) }
func (s *credentialsSuite) TestUserPassCredentialsValid(c *gc.C) { envtesting.AssertProviderCredentialsValid(c, s.provider, "userpass", map[string]string{ "application-id": "application", "application-password": "******", "subscription-id": "subscription", "tenant-id": "tenant", }) }
func (s *credentialsSuite) TestUserPassCredentialsValid(c *gc.C) { envtesting.AssertProviderCredentialsValid(c, s.provider, "userpass", map[string]string{ "sdc-user": "******", "sdc-key-id": "sdc-key-id", "private-key": "private-key", "algorithm": "rsa-sha256", }) }
func (s *credentialsSuite) TestJSONFileCredentialsValid(c *gc.C) { dir := c.MkDir() filename := filepath.Join(dir, "somefile") err := ioutil.WriteFile(filename, []byte{}, 0600) c.Assert(err, jc.ErrorIsNil) envtesting.AssertProviderCredentialsValid(c, s.provider, "jsonfile", map[string]string{ // For now at least, the contents of the file are not validated // by the credentials schema. That is left to the provider. // The file does need to be an absolute path though and exist. "file": filename, }) }
func (s *credentialsSuite) TestOAuth1CredentialsValid(c *gc.C) { envtesting.AssertProviderCredentialsValid(c, s.provider, "oauth1", map[string]string{ "maas-oauth": "123:456:789", }) }