}
@Ignore // NEXUS-6184
@Test
public void cleanUp() throws Exception {
final Repository hosted = createYumEnabledRepository(repositoryIdForTest());
final MavenProxyRepository proxy = createYumEnabledProxyRepository(repositoryIdForTest() + "-proxy", hosted.contentUri());
// upload to hosted
content().upload(
repositoryLocation(hosted.id(), "test/test-artifact/0.0.1/test-artifact-0.0.1.rpm"),
testData().resolveFile("/rpms/test-artifact-1.2.3-1.noarch.rpm")
);
client().getSubsystem(Routing.class).updatePrefixFile(proxy.id());
waitForNexusToSettleDown();
// verify proxy got it, and record the primary path
{
final String primaryXml = repodata().getMetadata(proxy.id(), PRIMARY_XML, String.class);
assertThat(primaryXml, containsString("test-artifact"));
}
final String primaryXmlPath1 = repodata().getMetadataPath(proxy.id(), PRIMARY_XML);
assertThat(content().exists(Location.repositoryLocation(proxy.id(), primaryXmlPath1)), is(true));
// upload to hosted something else, the modifies repomd.xml and all the files around it
content().upload(
repositoryLocation(hosted.id(), "test/othertest-artifact/0.0.1/othertest-artifact-0.0.1.rpm"),
testData().resolveFile("/rpms/test-artifact-1.2.3-1.noarch.rpm")
);
client().getSubsystem(Routing.class).updatePrefixFile(proxy.id());
waitForNexusToSettleDown();