use of org.commonjava.util.jhttpc.model.SiteConfig in project indy by Commonjava.
the class IndySiteConfigLookupTest method checkServerCertPemIsConfigured.
@Test
public void checkServerCertPemIsConfigured() throws IndyDataException {
RemoteRepository remote = new RemoteRepository(MAVEN_PKG_KEY, "test", "http://test.com/repo");
remote.setServerCertPem("AAAAFFFFFSDADFADSFASDFASDFASDFASDFASDFsa");
remote.setServerTrustPolicy("self-signed");
MemoryStoreDataManager storeData = new MemoryStoreDataManager(true);
storeData.storeArtifactStore(remote, new ChangeSummary(ChangeSummary.SYSTEM_USER, "This is a test"), false, false, new EventMetadata());
IndySiteConfigLookup lookup = new IndySiteConfigLookup(storeData);
SiteConfig siteConfig = lookup.lookup("remote:test");
assertThat(siteConfig.getServerCertPem(), equalTo(remote.getServerCertPem()));
}
use of org.commonjava.util.jhttpc.model.SiteConfig in project indy by Commonjava.
the class AbstractIndyFunctionalTest method createIndyClient.
protected Indy createIndyClient() throws IndyClientException {
SiteConfig config = new SiteConfigBuilder("indy", fixture.getUrl()).withRequestTimeoutSeconds(60).build();
Collection<IndyClientModule> modules = getAdditionalClientModules();
return new Indy(config, new MemoryPasswordManager(), new IndyObjectMapper(getAdditionalMapperModules()), modules.toArray(new IndyClientModule[modules.size()]));
}
Aggregations