use of com.artipie.asto.memory.InMemoryStorage in project front by artipie.
the class YamlUsersTest method init.
@BeforeEach
void init() {
this.blsto = new BlockingStorage(new InMemoryStorage());
this.users = new YamlUsers(YamlUsersTest.KEY, this.blsto);
}
use of com.artipie.asto.memory.InMemoryStorage in project maven-adapter by artipie.
the class MavenProxySliceAuthIT method setUp.
@BeforeEach
void setUp() throws Exception {
final Storage storage = new InMemoryStorage();
new TestResource("com/artipie/helloworld").addFilesTo(storage, new Key.From("com", "artipie", "helloworld"));
final String username = "alice";
final String password = "qwerty";
this.server = new VertxSliceServer(MavenProxySliceAuthIT.VERTX, new LoggingSlice(new MavenSlice(storage, (user, action) -> user.name().equals(username), new Authentication.Single(username, password))));
final int port = this.server.start();
this.client.start();
this.proxy = new LoggingSlice(new MavenProxySlice(this.client, URI.create(String.format("http://localhost:%d", port)), new BasicAuthenticator(username, password), Cache.NOP));
}
use of com.artipie.asto.memory.InMemoryStorage 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();
}
use of com.artipie.asto.memory.InMemoryStorage in project maven-adapter by artipie.
the class ArtifactGetResponseTest method notFoundIfDoesnExist.
@Test
void notFoundIfDoesnExist() {
final Storage storage = new InMemoryStorage();
MatcherAssert.assertThat(new ArtifactGetResponse(storage, new Key.From("none")), new RsHasStatus(RsStatus.NOT_FOUND));
}
use of com.artipie.asto.memory.InMemoryStorage in project maven-adapter by artipie.
the class ArtifactHeadResponseTest method notFoundIfDoesnExist.
@Test
void notFoundIfDoesnExist() {
final Storage storage = new InMemoryStorage();
MatcherAssert.assertThat(new ArtifactHeadResponse(storage, new Key.From("none")), new RsHasStatus(RsStatus.NOT_FOUND));
}
Aggregations