use of org.commonjava.indy.koji.client.IndyKojiClientModule in project indy by Commonjava.
the class RepairKojiRepositoryTest method run.
/**
* For this test to pass, below settings are needed in koji.conf:
*
* tag.patterns.enabled=false
* proxy.binary.builds=true
*/
@Ignore
@Test
public void run() throws Exception {
// 0. trigger koji repo creation
contentDownloadTime(pseudoGroupName, path);
contentDownloadTime(pseudoGroupName, binaryPath);
List<RemoteRepository> repos = getKojiRemoteRepositories();
RemoteRepository repository = null;
RemoteRepository repositoryBinary = null;
for (RemoteRepository r : repos) {
String name = r.getName();
if (name.startsWith(KOJI_ORIGIN_BINARY)) {
repositoryBinary = r;
} else {
repository = r;
}
}
assertThat(repositoryBinary, notNullValue());
assertThat(repository, notNullValue());
// 1. repair remote
IndyKojiClientModule module = client.module(IndyKojiClientModule.class);
KojiRepairResult ret = module.repairVol("maven", remote, repository.getName(), true);
boolean succeeded = ret.succeeded();
assertTrue(succeeded);
printResults(ret);
// 2. repair group
String groupName = "brew-proxies";
ret = module.repairVol("maven", group, groupName, true);
succeeded = ret.succeeded();
assertTrue(succeeded);
printResults(ret);
}
Aggregations