Skip to content

[FEATURE REQUEST] support TC_INITSCRIPT at JdbcDatabaseContainer level #532

@AnkBurov

Description

@AnkBurov

Hello. Current implementation of the jdbc:tc:* type of container initialization currently doesn't support private docker registers.

Usage of

System.setProperty("spring.datasource.url", "jdbc:tc:private.registry.org:5000/mariadb://hostname/databasename?TC_INITSCRIPT=${mariaInitScript}&TC_MY_CNF=maria-conf")

leads to

Caused by: java.lang.IllegalArgumentException: JDBC URL matches jdbc:tc: prefix but the database or tag name could not be identified
	at org.testcontainers.jdbc.ContainerDatabaseDriver.connect(ContainerDatabaseDriver.java:100)
	at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:310)
	... 64 more

Is it going to be fixed / implemented? Kinda confuses that private registers can be used with general container initialization (through builder-like fluent interface) and cannot with jdbc:tc:*.

upd: see comments below

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions