File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
main/java/org/testcontainers/containers
test/java/org/testcontainers/containers Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1111/**
1212 * Testcontainers implementation for PostgreSQL.
1313 * <p>
14- * Supported image : {@code postgres}
14+ * Supported images : {@code postgres}, {@code pgvector/pgvector }
1515 * <p>
1616 * Exposed ports: 5432
1717 */
@@ -25,6 +25,8 @@ public class PostgreSQLContainer<SELF extends PostgreSQLContainer<SELF>> extends
2525
2626 private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName .parse ("postgres" );
2727
28+ private static final DockerImageName PGVECTOR_IMAGE_NAME = DockerImageName .parse ("pgvector/pgvector" );
29+
2830 public static final Integer POSTGRESQL_PORT = 5432 ;
2931
3032 static final String DEFAULT_USER = "test" ;
@@ -53,7 +55,7 @@ public PostgreSQLContainer(final String dockerImageName) {
5355
5456 public PostgreSQLContainer (final DockerImageName dockerImageName ) {
5557 super (dockerImageName );
56- dockerImageName .assertCompatibleWith (DEFAULT_IMAGE_NAME );
58+ dockerImageName .assertCompatibleWith (DEFAULT_IMAGE_NAME , PGVECTOR_IMAGE_NAME );
5759
5860 this .waitStrategy =
5961 new LogMessageWaitStrategy ()
Original file line number Diff line number Diff line change @@ -15,9 +15,7 @@ public class CompatibleImageTest extends AbstractContainerDatabaseTest {
1515 public void pgvector () throws SQLException {
1616 try (
1717 // pgvectorContainer {
18- PostgreSQLContainer <?> pgvector = new PostgreSQLContainer <>(
19- DockerImageName .parse ("pgvector/pgvector:pg16" ).asCompatibleSubstituteFor ("postgres" )
20- )
18+ PostgreSQLContainer <?> pgvector = new PostgreSQLContainer <>("pgvector/pgvector:pg16" )
2119 // }
2220 ) {
2321 pgvector .start ();
You can’t perform that action at this time.
0 commit comments