use of org.commonjava.indy.client.core.Indy in project indy by Commonjava.
the class ProxyRemoteKojiContentTest method proxyBinaryRemoteKojiArtifact.
@Ignore
@Test
public void proxyBinaryRemoteKojiArtifact() throws Exception {
final String path = "org/apache/apache/18/apache-18.pom";
Indy client = new Indy("http://localhost:8080/api", new IndyObjectMapper(Collections.emptySet()), Collections.emptySet()).connect();
long elapse = getContent("build-x", client, path);
// the remote store should have been added to brew-binaries group
StoreListingDTO<RemoteRepository> repos = client.stores().listRemoteRepositories();
for (RemoteRepository repo : repos.getItems()) {
logger.debug("Repo " + repo.getName());
if (repo.getName().startsWith(KOJI_ORIGIN)) {
logger.debug("Koji repo patterns: " + repo.getPathMaskPatterns());
}
}
}
use of org.commonjava.indy.client.core.Indy in project indy by Commonjava.
the class ExternalKojiTest method setupExternalKojiBase.
@Before
public void setupExternalKojiBase() throws IndyClientException {
client = new Indy("http://localhost:8080/api", new IndyObjectMapper(Collections.emptySet()), getAdditionalClientModules()).connect();
Group proxyGroup = new Group("maven", kojiProxyGroupName);
boolean exist = client.stores().exists(proxyGroup.getKey());
if (!exist) {
client.stores().create(proxyGroup, "adding brew-proxies", Group.class);
}
Group pseudoGroup = new Group("maven", pseudoGroupName);
exist = client.stores().exists(pseudoGroup.getKey());
if (!exist) {
client.stores().create(pseudoGroup, "adding pseudo group", Group.class);
}
}
use of org.commonjava.indy.client.core.Indy in project indy by Commonjava.
the class ProxyRemoteKojiContentTest method proxyRemoteKojiArtifact.
/**
* Accessing an existing external Koji site and retrieve artifact. This is disabled by default. In order to run it,
* you need an external Koji instance and start Indy via:
* 1. export TEST_ETC=<your-koji-config-dir> => with proper settings for Koji url, pem, etc
* 2. bin/test-setup.sh => to start Indy
* 3. run this test
*/
@Ignore
@Test
public void proxyRemoteKojiArtifact() throws Exception {
final String path = "org/dashbuilder/dashbuilder-all/0.4.0.Final-redhat-10/dashbuilder-all-0.4.0.Final-redhat-10.pom";
Indy client = new Indy("http://localhost:8080/api", new IndyObjectMapper(Collections.emptySet()), Collections.emptySet()).connect();
// would be slow the first time to get an artifact
long elapse = getContent("build-x", client, path);
logger.debug("Get (first) use " + elapse + " milliseconds");
// the following get should have been cached and fast
elapse = getContent("build-x", client, path);
logger.debug("Get (second) use " + elapse + " milliseconds");
// the remote store should have been added to builds-untested group
StoreListingDTO<RemoteRepository> repos = client.stores().listRemoteRepositories();
for (RemoteRepository repo : repos.getItems()) {
logger.debug("Repo " + repo.getName());
if (repo.getName().startsWith(KOJI_ORIGIN)) {
logger.debug("Koji repo patterns: " + repo.getPathMaskPatterns());
}
}
}
use of org.commonjava.indy.client.core.Indy in project indy by Commonjava.
the class DownloadDiagBundleTest method createIndyClient.
protected Indy createIndyClient() throws IndyClientException {
SiteConfig config = new SiteConfigBuilder("indy", fixture.getUrl()).withRequestTimeoutSeconds(120).build();
Collection<IndyClientModule> modules = getAdditionalClientModules();
return new Indy(config, new MemoryPasswordManager(), new IndyObjectMapper(getAdditionalMapperModules()), modules.toArray(new IndyClientModule[modules.size()]));
}
use of org.commonjava.indy.client.core.Indy 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