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 @Override
public GenericContainer<?> getContainer(DolphinSchedulerDatabaseContainer dataSourceContainer) { public GenericContainer<?> getContainer(DolphinSchedulerDatabaseContainer dataSourceContainer) {
// todo: test with multiple pg version // todo: test with multiple pg version
GenericContainer<?> postgresqlContainer = new PostgreSQLContainer(DockerImageName.parse("postgres:11.1")) GenericContainer<?> postgresqlContainer =
.withUsername("root") new PostgreSQLContainer(DockerImageName.parse(dataSourceContainer.imageName()))
.withPassword("root") .withUsername("root")
.withDatabaseName("dolphinscheduler") .withPassword("root")
.withNetwork(NETWORK) .withDatabaseName("dolphinscheduler")
.withExposedPorts(5432); .withNetwork(NETWORK)
.withExposedPorts(5432);
postgresqlContainer.setPortBindings(Lists.newArrayList("5432:5432")); postgresqlContainer.setPortBindings(Lists.newArrayList("5432:5432"));
return postgresqlContainer; return postgresqlContainer;

Loading…
Cancel
Save