Skip to content

jarlah/testcontainers-ceph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Testcontainers Ceph

main

Maven Central

A Testcontainers implementation for Ceph.

How to use

You can use the @Container annotation to start a Ceph container.

Default image

@Container
CephContainer container = new CephContainer();

Custom image

@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")
);

Configure access key and secret key

@Container
CephContainer container = new CephContainer("quay.io/ceph/demo")
    .withCephAccessKey("accessKey")
    .withCephAccessKey("secretKey");

How to get it?


Include it into your project dependencies

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>