testcontainers / testcontainers/testcontainers-java
Allow for an init script that runs as the database admin (superuser) for JdbcTestContainer implementations
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
This would allow customized setup that just isn't possible as the "test" user.
TC_INITSCRIPT_SUPER parameter maybe?
This would ideally run before the
TC_INITSCRIPT
so there is an opportunity to configure things before the main real-user based init script runs.
Example Usages...
- Setting up multischema databases (that utilize joins across schemas)
- Some stored procedure creation DDLs need admin/root access on the DB
- Custom database/schema naming
- Grants
As a side-note it would be nice to have a code-based way to get a connection as the admin/root user for code based configuration that requires it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the JdbcTestContainer implementations and the existing TC_INITSCRIPT handling. Trace how initialization scripts and database-user connections are configured, then verify that a superuser setup runs before the main test-user script and supports the listed schema, DDL, naming, and grant use cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- databases, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100