Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make docker image name in PostgreSQL query runner configurable #23089

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.Map;

import static io.airlift.testing.Closeables.closeAllSuppress;
import static io.trino.plugin.postgresql.TestingPostgreSqlServer.DEFAULT_IMAGE_NAME;
import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME;
import static io.trino.testing.QueryAssertions.copyTpchTables;
import static io.trino.testing.TestingSession.testSessionBuilder;
Expand Down Expand Up @@ -102,7 +103,7 @@ public DistributedQueryRunner build()
public static void main(String[] args)
throws Exception
{
QueryRunner queryRunner = builder(new TestingPostgreSqlServer(true))
QueryRunner queryRunner = builder(new TestingPostgreSqlServer(System.getProperty("testing.postgresql-image-name", DEFAULT_IMAGE_NAME), true))
.addCoordinatorProperty("http-server.http.port", "8080")
.setInitialTables(TpchTable.getTables())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
public class TestingPostgreSqlServer
implements AutoCloseable
{
public static final String DEFAULT_IMAGE_NAME = "postgres:11";

private static final String USER = "test";
private static final String PASSWORD = "test";
private static final String DATABASE = "tpch";
Expand All @@ -77,7 +79,7 @@ public TestingPostgreSqlServer()
public TestingPostgreSqlServer(boolean shouldExposeFixedPorts)
{
// Use the oldest supported PostgreSQL version
this("postgres:11", shouldExposeFixedPorts);
this(DEFAULT_IMAGE_NAME, shouldExposeFixedPorts);
}

public TestingPostgreSqlServer(String dockerImageName, boolean shouldExposeFixedPorts)
Expand Down
Loading