Browse Source

Fix PostgresqlDatabaseContainerProvider get Image is incorrect (#15434)

3.2.1-prepare
Wenjun Ruan 10 months ago committed by GitHub
parent
commit
dcf69cad20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 13
      dolphinscheduler-tools/src/test/java/org/apache/dolphinscheduler/tools/datasource/postgresql/PostgresqlDatabaseContainerProvider.java

13
dolphinscheduler-tools/src/test/java/org/apache/dolphinscheduler/tools/datasource/postgresql/PostgresqlDatabaseContainerProvider.java

@ -40,12 +40,13 @@ public class PostgresqlDatabaseContainerProvider implements DatabaseContainerPro
@Override
public GenericContainer<?> getContainer(DolphinSchedulerDatabaseContainer dataSourceContainer) {
// todo: test with multiple pg version
GenericContainer<?> postgresqlContainer = new PostgreSQLContainer(DockerImageName.parse("postgres:11.1"))
.withUsername("root")
.withPassword("root")
.withDatabaseName("dolphinscheduler")
.withNetwork(NETWORK)
.withExposedPorts(5432);
GenericContainer<?> postgresqlContainer =
new PostgreSQLContainer(DockerImageName.parse(dataSourceContainer.imageName()))
.withUsername("root")
.withPassword("root")
.withDatabaseName("dolphinscheduler")
.withNetwork(NETWORK)
.withExposedPorts(5432);
postgresqlContainer.setPortBindings(Lists.newArrayList("5432:5432"));
return postgresqlContainer;

Loading…
Cancel
Save