use of com.yahoo.athenz.zts.InstanceProviderManager in project athenz by yahoo.
the class InstanceProviderManagerTest method testGetHttpsProviderUnknownProvider.
@Test
public void testGetHttpsProviderUnknownProvider() {
SignedDomain signedDomain = createSignedDomainHttpsEndpoint("coretech", "weather", true, true);
store.processDomain(signedDomain, false);
InstanceProviderManager provider = new InstanceProviderManager(store, null);
InstanceProvider client = provider.getProvider("coretech.weather");
assertNotNull(client);
client.close();
}
use of com.yahoo.athenz.zts.InstanceProviderManager in project athenz by yahoo.
the class InstanceProviderManagerTest method testGetProviderScheme.
@Test
public void testGetProviderScheme() throws URISyntaxException {
InstanceProviderManager provider = new InstanceProviderManager(null, null);
URI uri = new URI("https://test.athenz2.com/");
assertEquals(provider.getProviderScheme(uri), ProviderScheme.HTTPS);
uri = new URI("class://com.yahoo.athenz.AWSProvider");
assertEquals(provider.getProviderScheme(uri), ProviderScheme.CLASS);
uri = new URI("http://test.athenz2.com/");
assertEquals(provider.getProviderScheme(uri), ProviderScheme.UNKNOWN);
uri = new URI("ftp://test.athenz2.com/");
assertEquals(provider.getProviderScheme(uri), ProviderScheme.UNKNOWN);
uri = new URI("test.athenz2.com/");
assertEquals(provider.getProviderScheme(uri), ProviderScheme.UNKNOWN);
}
use of com.yahoo.athenz.zts.InstanceProviderManager in project athenz by yahoo.
the class InstanceProviderManagerTest method testGetProviderClientInvalidService.
@Test
public void testGetProviderClientInvalidService() {
SignedDomain signedDomain = createSignedDomainHttpsEndpoint("coretech", "weather", true, true);
store.processDomain(signedDomain, false);
InstanceProviderManager provider = new InstanceProviderManager(store, null);
InstanceProvider client = provider.getProvider("coretech.weather2");
assertNull(client);
}
use of com.yahoo.athenz.zts.InstanceProviderManager in project athenz by yahoo.
the class InstanceProviderManagerTest method testGetClassProvider.
@Test
public void testGetClassProvider() {
SignedDomain signedDomain = createSignedDomainClassEndpoint("coretech", "weather", true, true);
store.processDomain(signedDomain, false);
InstanceProviderManager provider = new InstanceProviderManager(store, null);
InstanceProvider client = provider.getProvider("coretech.weather");
assertNotNull(client);
client.close();
}
use of com.yahoo.athenz.zts.InstanceProviderManager in project athenz by yahoo.
the class InstanceProviderManagerTest method testGetProviderClientInvalidDomain.
@Test
public void testGetProviderClientInvalidDomain() {
SignedDomain signedDomain = createSignedDomainHttpsEndpoint("coretech", "weather", true, true);
store.processDomain(signedDomain, false);
InstanceProviderManager provider = new InstanceProviderManager(store, null);
InstanceProvider client = provider.getProvider("coretech2.weather");
assertNull(client);
}
Aggregations