Skip to content

test: silence Testcontainers 4.13 obsolete PostgreSqlBuilder() ctor#22

Merged
Trifunovich merged 1 commit into
mainfrom
fix/testcontainers-obsolete-ctor
Jul 11, 2026
Merged

test: silence Testcontainers 4.13 obsolete PostgreSqlBuilder() ctor#22
Trifunovich merged 1 commit into
mainfrom
fix/testcontainers-obsolete-ctor

Conversation

@Trifunovich

Copy link
Copy Markdown
Collaborator

What

new PostgreSqlBuilder("postgres:15-alpine") instead of new PostgreSqlBuilder().WithImage("postgres:15-alpine") in PostgresFixture.

Why

Testcontainers.PostgreSql 4.13 (merged in #18) deprecated the parameterless PostgreSqlBuilder() constructor (CS0618); it's slated for removal in a future major. The image now goes to the constructor. Surfaced by the new pre-merge CI on the 4.13 bump.

Test

dotnet build -c Release — CS0618 gone. dotnet test — 28/28 pass. Pre-merge CI on this PR re-verifies.

4.13 deprecated the parameterless builder; pass the image to the constructor
instead of via .WithImage(). No behavior change, 28/28 integ tests pass.
@Trifunovich Trifunovich merged commit 0ad31f3 into main Jul 11, 2026
1 check passed
@Trifunovich Trifunovich deleted the fix/testcontainers-obsolete-ctor branch July 11, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant