I'm using this dependency:
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.5.1</version>
<scope>test</scope>
</dependency>
this is the Container, lauched with my tests:
@ClassRule
public static PostgreSQLContainer postgres = new PostgreSQLContainer()
.withDatabaseName("user")
.withUsername("postgres")
.withPassword("postgres");
but when i'm trying to stablish connection to database user
i'm receiving exception:
PSQLException: FATAL: database "user" does not exist
In this container only present default DB "postgres"
.
How to create database "user"
?