Пример #1
0
func (*DiscoverySuite) TestAuthorizationURITenantIDError(c *gc.C) {
	url, err := url.Parse("https://testing.invalid/foo")
	c.Assert(err, jc.ErrorIsNil)
	_, err = azureauth.AuthorizationURITenantID(url)
	c.Assert(err, gc.ErrorMatches, `authorization_uri "https://testing.invalid/foo" not valid`)
}
Пример #2
0
func (*DiscoverySuite) TestAuthorizationURITenantID(c *gc.C) {
	tenantId, err := azureauth.AuthorizationURITenantID(&url.URL{Path: "/3671f5a9-c0d0-472b-a80c-48135cf5a9f1"})
	c.Assert(err, jc.ErrorIsNil)
	c.Assert(tenantId, gc.Equals, "3671f5a9-c0d0-472b-a80c-48135cf5a9f1")
}