Skip to content

Conversation

MD-V
Copy link
Contributor

@MD-V MD-V commented Oct 21, 2025

Make WireMock.Net.Testcontainers compatible with Testcontainers 4.8.0.
Testcontainers 4.8.0 is not binary compatible with 4.7.0.
Ctor of WireMockConfiguration breaks with a MissingMethodException:

System.MissingMethodException : Method not found: 'Void DotNet.Testcontainers.Configurations.ContainerConfiguration..ctor(DotNet.Testcontainers.Images.IImage, System.Func`2<Docker.DotNet.Models.ImageInspectResponse,Boolean>, System.String, System.String, System.String, System.String, System.Collections.Generic.IEnumerable`1<System.String>, DotNet.Testcontainers.Configurations.ComposableEnumerable`1<System.String>, System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.String>, System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.String>, System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.String>, System.Collections.Generic.IEnumerable`1<DotNet.Testcontainers.Configurations.IResourceMapping>, System.Collections.Generic.IEnumerable`1<DotNet.Testcontainers.Containers.IContainer>, System.Collections.Generic.IEnumerable`1<DotNet.Testcontainers.Configurations.IMount>, System.Collections.Generic.IEnumerable`1<DotNet.Testcontainers.Networks.INetwork>, System.Collections.Generic.IEnumerable`1<System.String>, System.Collections.Generic.IEnumerable`1<System.String>, DotNet.Testcontainers.Configurations.IOutputConsumer, System.Collections.Generic.IEnumerable`1<DotNet.Testcontainers.Configurations.WaitStrategy>, System.Func`3<DotNet.Testcontainers.Containers.IContainer,System.Threading.CancellationToken,System.Threading.Tasks.Task>, System.Nullable`1<Boolean>, System.Nullable`1<Boolean>)'.

References

testcontainers/testcontainers-dotnet@3b4f418#diff-42f9d6914c9475812b1c918ce9604fc2db0344b779868718675ea7850510b578

testcontainers/testcontainers-dotnet@c27a94b#diff-cfb5e3427ad9917120dc63419d9b834390f507ddfeb00dceb2fc1bd6f8d503a5

Submitter checklist

  • Recommended: Join WireMock Slack to get any help in #help-contributing or a project-specific channel like #wiremock-java
  • The PR request is well described and justified, including the body and the references
  • The PR title represents the desired changelog entry
  • The repository's code style is followed (see the contributing guide)
  • Test coverage that demonstrates that the change works as expected
  • For new features, there's necessary documentation in this pull request or in a subsequent PR to wiremock.org

@StefH StefH requested a review from Copilot October 21, 2025 19:32
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates WireMock.Net.Testcontainers to support Testcontainers 4.8.0, which introduced breaking API changes. The main issue was a MissingMethodException caused by changes to the ContainerConfiguration constructor signature in Testcontainers 4.8.0.

Key Changes:

  • Updated Testcontainers package dependency from 4.7.0 to 4.8.0
  • Added uid and gid parameters to the CopyAsync method to match the new base class signature

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
WireMock.Net.Testcontainers.csproj Updated Testcontainers package reference to version 4.8.0
WireMockContainer.cs Added uid and gid parameters to CopyAsync method override to match new base class signature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@StefH StefH assigned StefH and unassigned StefH Oct 22, 2025
@StefH StefH added the bug label Oct 22, 2025
@StefH StefH merged commit c1b23b6 into wiremock:master Oct 22, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants