use of org.apache.archiva.rest.api.services.MergeRepositoriesService in project archiva by apache.
the class MergeRepositoriesServiceTest method merge.
@Test
public void merge() throws Exception {
String mergedArtifactPath = "org/apache/felix/org.apache.felix.bundlerepository/1.6.4/org.apache.felix.bundlerepository-1.6.4.jar";
String mergedArtifactPomPath = "org/apache/felix/org.apache.felix.bundlerepository/1.6.4/org.apache.felix.bundlerepository-1.6.4.pom";
assertTrue(Files.exists(repoStage.resolve(mergedArtifactPath)));
assertTrue(Files.exists(repoStage.resolve(mergedArtifactPomPath)));
MergeRepositoriesService service = getMergeRepositoriesService(authorizationHeader);
service.mergeRepositories(TEST_REPOSITORY + "-stage", TEST_REPOSITORY, true);
assertTrue(Files.exists(repo.resolve(mergedArtifactPath)));
assertTrue(Files.exists(repo.resolve(mergedArtifactPomPath)));
}
use of org.apache.archiva.rest.api.services.MergeRepositoriesService in project archiva by apache.
the class MergeRepositoriesServiceTest method getMergeConflictedArtifacts.
@Test
public void getMergeConflictedArtifacts() throws Exception {
MergeRepositoriesService service = getMergeRepositoriesService(authorizationHeader);
List<Artifact> artifactMetadatas = service.getMergeConflictedArtifacts(TEST_REPOSITORY + "-stage", TEST_REPOSITORY);
log.info("conflicts: {}", artifactMetadatas);
assertThat(artifactMetadatas).isNotNull().isNotEmpty().hasSize(8);
}
Aggregations