Skip to content

Conversation

@spencerarq
Copy link

Description

This PR improves the test coverage for the PostgreSQLContainer class by validating the configuration of custom credentials (databaseName, username, password).

Context

Previous tests primarily covered default settings. Fluent configuration methods for custom credentials were identified as coverage gaps during analysis (red lines in coverage report).

Changes

  • Added testCustomCredentials to PostgreSQLContainerTest.java.
  • This new test validates that:
    • Fluent setters correctly update the container state.
    • The generated JDBC URL contains the correct database name.
    • The container successfully starts with non-default credentials.

Impact

  • Line Coverage: Increased from 77% to ~97% for PostgreSQLContainer.java.
  • Method Coverage: Increased from 66% to ~93%.

@spencerarq spencerarq requested a review from a team as a code owner November 22, 2025 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant