You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
550 B
Java
20 lines
550 B
Java
package at.procon.dip;
|
|
|
|
import org.testcontainers.containers.PostgreSQLContainer;
|
|
|
|
public class FixedPortPostgreSQLContainer<SELF extends FixedPortPostgreSQLContainer<SELF>>
|
|
extends PostgreSQLContainer<SELF> {
|
|
|
|
private final int hostPort;
|
|
|
|
public FixedPortPostgreSQLContainer(String imageName, int hostPort) {
|
|
super(imageName);
|
|
this.hostPort = hostPort;
|
|
}
|
|
|
|
@Override
|
|
protected void configure() {
|
|
super.configure();
|
|
addFixedExposedPort(hostPort, PostgreSQLContainer.POSTGRESQL_PORT);
|
|
}
|
|
} |