29 Mart 2023 Çarşamba

Testcontainers CouchbaseContainer Sınıfı

Örnek
Şöyle yaparız
import org.testcontainers.containers.output.Slf4jLogConsumer;
import org.testcontainers.couchbase.BucketDefinition;
import org.testcontainers.couchbase.CouchbaseContainer;

private static final String BUCKET_NAME = "mybucket";

public static final CouchbaseContainer container = new CouchbaseContainer("couchbase/server:7.1.1")
  .withBucket(new BucketDefinition(BUCKET_NAME));
  .withBucket(new BucketDefinition(BUCKET_NAME))
  .withStartupTimeout(Duration.ofSeconds(120))
  .withFileSystemBind("target/couchbase-logs", "/opt/couchbase/var/lib/couchbase/logs")
  .withLogConsumer(new Slf4jLogConsumer(LOGGER).withPrefix("Docker"));


Hiç yorum yok:

Yorum Gönder