testcontainers / testcontainers/testcontainers-java

Missing constructor PostgreSQLContainer(Future<String> image)

Open
#3,184 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

The super classes of PostgreSQLContainer have a constructor with argument Future<String> image which allows to pass in an ImageFromDockerfile instance. This is currently not possible on the PostgreSQLContainer class.

The workaround is to instantiate PostgreSQLContainer, and then call the inherited setter org.testcontainers.containers.GenericContainer#setImage.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at PostgreSQLContainer and compare its constructors with those of its superclasses, especially the Future image argument and ImageFromDockerfile usage. Check the inherited GenericContainer#setImage workaround to understand the current behavior. Done means PostgreSQLContainer directly accepts the image argument without requiring the setter.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java, postgresql
Domain
databases, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.