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.
DIP/src/test/java/at/procon/dip/FixedPortPostgreSQLContaine...

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);
}
}