A Testcontainers implementation for Ceph.
You can use the @Container
annotation to start a Ceph container.
@Container
CephContainer container = new CephContainer();
@Container
CephContainer container = new CephContainer(DockerImageName.parse("quay.io/ceph/demo"));
or override with a non-standard, but yet compliant image, for ex if you make a new image based on quay.io/ceph/demo
@Container
CephContainer container = new CephContainer(
DockerImageName.parse("our-prebuilt-ceph-demo-image")
.asCompatibleSubstituteFor("quay.io/ceph/demo")
);
@Container
CephContainer container = new CephContainer("quay.io/ceph/demo")
.withCephAccessKey("accessKey")
.withCephAccessKey("secretKey");
Its available in Maven Central.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>1.19.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
</dependency>
<dependency>
<groupId>io.github.jarlah</groupId>
<artifactId>testcontainers-ceph</artifactId>
<scope>test</scope>
<version>2.0.0</version>
</dependency>
</dependencies>