Search in sources :

Example 1 with ArtifactStoreValidator

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, "");
}
Also used : Group(org.commonjava.indy.model.core.Group) ArtifactStoreValidator(org.commonjava.indy.data.ArtifactStoreValidator) DataFileEventManager(org.commonjava.indy.subsys.datafile.change.DataFileEventManager) ImpliedRepoMetadataManager(org.commonjava.indy.implrepo.data.ImpliedRepoMetadataManager) RemoteRepository(org.commonjava.indy.model.core.RemoteRepository) MemoryPasswordManager(org.commonjava.maven.galley.auth.MemoryPasswordManager) GalleyMavenFixture(org.commonjava.maven.galley.testing.maven.GalleyMavenFixture) HttpImpl(org.commonjava.maven.galley.transport.htcli.HttpImpl) ScriptEngine(org.commonjava.indy.subsys.template.ScriptEngine) EventMetadata(org.commonjava.maven.galley.event.EventMetadata) HttpClientTransport(org.commonjava.maven.galley.transport.htcli.HttpClientTransport) IndyObjectMapper(org.commonjava.indy.model.core.io.IndyObjectMapper) MemoryStoreDataManager(org.commonjava.indy.mem.data.MemoryStoreDataManager) DataFileManager(org.commonjava.indy.subsys.datafile.DataFileManager) ImpliedRepoConfig(org.commonjava.indy.implrepo.conf.ImpliedRepoConfig) ChangeSummary(org.commonjava.indy.audit.ChangeSummary) File(java.io.File) Before(org.junit.Before)

Aggregations

File (java.io.File)1 ChangeSummary (org.commonjava.indy.audit.ChangeSummary)1 ArtifactStoreValidator (org.commonjava.indy.data.ArtifactStoreValidator)1 ImpliedRepoConfig (org.commonjava.indy.implrepo.conf.ImpliedRepoConfig)1 ImpliedRepoMetadataManager (org.commonjava.indy.implrepo.data.ImpliedRepoMetadataManager)1 MemoryStoreDataManager (org.commonjava.indy.mem.data.MemoryStoreDataManager)1 Group (org.commonjava.indy.model.core.Group)1 RemoteRepository (org.commonjava.indy.model.core.RemoteRepository)1 IndyObjectMapper (org.commonjava.indy.model.core.io.IndyObjectMapper)1 DataFileManager (org.commonjava.indy.subsys.datafile.DataFileManager)1 DataFileEventManager (org.commonjava.indy.subsys.datafile.change.DataFileEventManager)1 ScriptEngine (org.commonjava.indy.subsys.template.ScriptEngine)1 MemoryPasswordManager (org.commonjava.maven.galley.auth.MemoryPasswordManager)1 EventMetadata (org.commonjava.maven.galley.event.EventMetadata)1 GalleyMavenFixture (org.commonjava.maven.galley.testing.maven.GalleyMavenFixture)1 HttpClientTransport (org.commonjava.maven.galley.transport.htcli.HttpClientTransport)1 HttpImpl (org.commonjava.maven.galley.transport.htcli.HttpImpl)1 Before (org.junit.Before)1