Search in sources :

Example 1 with FromStorageCache

use of com.artipie.asto.cache.FromStorageCache in project maven-adapter by artipie.

the class MavenProxyIT method setUp.

@BeforeEach
void setUp() throws Exception {
    final JettyClientSlices slices = new JettyClientSlices();
    slices.start();
    this.storage = new InMemoryStorage();
    this.server = new VertxSliceServer(MavenProxyIT.VERTX, new LoggingSlice(new MavenProxySlice(slices, URI.create("https://repo.maven.apache.org/maven2"), Authenticator.ANONYMOUS, new FromStorageCache(this.storage))));
    this.port = this.server.start();
    Testcontainers.exposeHostPorts(this.port);
    this.cntn = new GenericContainer<>("maven:3.6.3-jdk-11").withCommand("tail", "-f", "/dev/null").withWorkingDirectory("/home/").withFileSystemBind(this.tmp.toString(), "/home");
    this.cntn.start();
}
Also used : InMemoryStorage(com.artipie.asto.memory.InMemoryStorage) VertxSliceServer(com.artipie.vertx.VertxSliceServer) FromStorageCache(com.artipie.asto.cache.FromStorageCache) JettyClientSlices(com.artipie.http.client.jetty.JettyClientSlices) GenericContainer(org.testcontainers.containers.GenericContainer) MavenProxySlice(com.artipie.maven.http.MavenProxySlice) LoggingSlice(com.artipie.http.slice.LoggingSlice) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with FromStorageCache

use of com.artipie.asto.cache.FromStorageCache in project maven-adapter by artipie.

the class MavenProxySliceITCase method setUp.

@BeforeEach
void setUp() throws Exception {
    this.client.start();
    this.storage = new InMemoryStorage();
    this.server = new VertxSliceServer(MavenProxySliceITCase.VERTX, new LoggingSlice(new MavenProxySlice(this.client, URI.create("https://repo.maven.apache.org/maven2"), Authenticator.ANONYMOUS, new FromStorageCache(this.storage))));
    this.port = this.server.start();
}
Also used : InMemoryStorage(com.artipie.asto.memory.InMemoryStorage) VertxSliceServer(com.artipie.vertx.VertxSliceServer) FromStorageCache(com.artipie.asto.cache.FromStorageCache) LoggingSlice(com.artipie.http.slice.LoggingSlice) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

FromStorageCache (com.artipie.asto.cache.FromStorageCache)2 InMemoryStorage (com.artipie.asto.memory.InMemoryStorage)2 LoggingSlice (com.artipie.http.slice.LoggingSlice)2 VertxSliceServer (com.artipie.vertx.VertxSliceServer)2 BeforeEach (org.junit.jupiter.api.BeforeEach)2 JettyClientSlices (com.artipie.http.client.jetty.JettyClientSlices)1 MavenProxySlice (com.artipie.maven.http.MavenProxySlice)1 GenericContainer (org.testcontainers.containers.GenericContainer)1