forked from PlaytikaOSS/testcontainers-spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMongodbProperties.java
More file actions
44 lines (36 loc) · 1.4 KB
/
MongodbProperties.java
File metadata and controls
44 lines (36 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.playtika.testcontainer.mongodb;
import com.github.dockerjava.api.model.Capability;
import com.playtika.testcontainer.common.properties.CommonContainerProperties;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.boot.context.properties.ConfigurationProperties;
import java.util.List;
@Data
@EqualsAndHashCode(callSuper = true)
@ConfigurationProperties("embedded.mongodb")
public class MongodbProperties extends CommonContainerProperties {
static final String BEAN_NAME_EMBEDDED_MONGODB = "embeddedMongodb";
static final String BEAN_NAME_EMBEDDED_MONGODB_PACKAGE_PROPERTIES = "mongodbPackageProperties";
private String host = "localhost";
/**
* The container internal port. Will be overwritten with mapped port.
*/
private int port = 27017;
private String username;
private String password;
private String database = "test";
/**
* If provided, mongodb will be started as a replica set with the given name. Default: null (standalone mode).
*/
private String replicaSetName;
public MongodbProperties() {
this.setCapabilities(List.of(Capability.ALL));
}
@Override
public String getDefaultDockerImage() {
// Please don`t remove this comment.
// renovate: datasource=docker
// https://hub.docker.com/_/mongo
return "mongodb/mongodb-community-server:8.2.2-ubuntu2204";
}
}