use of com.artipie.asto.blocking.BlockingStorage in project front by artipie.
the class PutUserTest method init.
@BeforeEach
void init() {
this.asto = new BlockingStorage(new InMemoryStorage());
this.users = new YamlUsers(PutUserTest.CREDS_YAML, this.asto);
}
use of com.artipie.asto.blocking.BlockingStorage 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.blocking.BlockingStorage in project maven-adapter by artipie.
the class ArtifactHeadResponseTest method noBodyIfExists.
@Test
void noBodyIfExists() throws Exception {
final Storage storage = new InMemoryStorage();
final Key key = new Key.From("repo/artifact2.jar");
new BlockingStorage(storage).save(key, "data".getBytes(StandardCharsets.UTF_8));
MatcherAssert.assertThat(new ArtifactHeadResponse(storage, key), new RsHasBody(new byte[0]));
}
use of com.artipie.asto.blocking.BlockingStorage in project artipie by artipie.
the class RepositoriesFromStorageCacheTest method readConfigFromCacheAfterSavingNewValueInStorage.
@Test
void readConfigFromCacheAfterSavingNewValueInStorage() {
final Key key = new Key.From("some-repo.yaml");
final byte[] old = "some: data".getBytes();
final byte[] upd = "some: new data".getBytes();
new BlockingStorage(this.storage).save(key, old);
final ClientSlices http = new JettyClientSlices();
new RepositoriesFromStorage(http, this.storage).config(key.string()).toCompletableFuture().join();
new BlockingStorage(this.storage).save(key, upd);
MatcherAssert.assertThat(new RepositoriesFromStorage(http, this.storage).config(key.string()).toCompletableFuture().join().toString(), new IsEqual<>(new String(old)));
}
Aggregations