use of org.commonjava.indy.data.ArtifactStoreValidator in project indy by Commonjava.
the class ImpliedRepositoryDetectorTest method setup.
@Before
public void setup() throws Throwable {
fixture = new GalleyMavenFixture(temp);
fixture.initGalley();
fixture.withEnabledTransports(new HttpClientTransport(new HttpImpl(new MemoryPasswordManager())));
fixture.before();
storeManager = new MemoryStoreDataManager(true);
metadataManager = new ImpliedRepoMetadataManager(new IndyObjectMapper(true));
final ImpliedRepoConfig config = new ImpliedRepoConfig();
config.setEnabled(true);
File rootDir = temp.newFolder("indy.root");
final DataFileManager dataFiles = new DataFileManager(rootDir, new DataFileEventManager());
validator = new ArtifactStoreValidator(fixture.getTransferManager());
ScriptEngine engine = new ScriptEngine(dataFiles);
detector = new TestImpliedRepositoryDetector(fixture.getPomReader(), storeManager, metadataManager, validator, engine, config);
summary = new ChangeSummary(ChangeSummary.SYSTEM_USER, "test setup");
RemoteRepository remote = new RemoteRepository("test", "http://www.foo.com/repo");
Group group = new Group("group", remote.getKey());
storeManager.storeArtifactStore(remote, summary, false, true, new EventMetadata());
storeManager.storeArtifactStore(group, summary, false, true, new EventMetadata());
server.expect("HEAD", server.formatUrl("/repo/"), 200, "");
}
Aggregations