Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability To Pin WireMock.NET Test Container To A Particular Version Of WireMock.NET #1150

Closed
Xor-el opened this issue Jul 29, 2024 · 7 comments
Assignees
Labels

Comments

@Xor-el
Copy link

Xor-el commented Jul 29, 2024

Is your feature request related to a problem? Please describe.

As of today, it is not possible to anchor a WireMock.NET test container to a specific version of WireMock, unlike other test containers such as Redis and SQL Server that offer this capability. Recently, the SQL Server Docker Image incorporated a breaking change, which subsequently disrupted SQL Server test containers in numerous CI/CD pipelines where the image was not pinned to a fixed version. Fortunately, these containers permit version pinning, thereby providing a provisional solution for development teams while the underlying issue is addressed.

Furthermore, it is deemed best practice by the test container team to consistently pin the image to a specific version.

Describe the solution you'd like
Having the ability to pin the needed WireMock.NET version when building a WireMock.NET test container would be a welcome development.

Describe alternatives you've considered
N/A

Is your feature request supported by WireMock (java version)? Please provide details.
Provide relevant information if requested feature is supported in Handlebarsjs but is missing in our implementation.
N/A

Additional context
N/A

@Xor-el Xor-el added the feature label Jul 29, 2024
@Xor-el Xor-el changed the title Ability To Pin WireMock.NET Test Container To A Particular Version Of WireMock Ability To Pin WireMock.NET Test Container To A Particular Version Of WireMock.NET Jul 29, 2024
@StefH StefH self-assigned this Jul 30, 2024
@StefH
Copy link
Collaborator

StefH commented Sep 25, 2024

#1181

@StefH
Copy link
Collaborator

StefH commented Sep 25, 2024

@Xor-el
This is already possible.

By default you would use this code:

var container = new WireMockContainerBuilder()
            .WithAdminUserNameAndPassword("x", "y")
            .WithAutoRemove(true)
            .WithCleanUp(true)
            .Build();

And in case you want to use a different version, use:

var container = new WireMockContainerBuilder()
            .WithImage("sheyenrath/wiremock.net-alpine:1.6.4")
            .WithAdminUserNameAndPassword("x", "y")
            .WithAutoRemove(true)
            .WithCleanUp(true)
            .Build();

@Xor-el
Copy link
Author

Xor-el commented Sep 26, 2024

Hello @StefH thanks for the sample and changes.
very much appreciated.

@StefH
Copy link
Collaborator

StefH commented Sep 26, 2024

If you have time, can you also take a quick look at the PR #1181

If it's correct, I'll merge this PR to master.

@Xor-el
Copy link
Author

Xor-el commented Sep 26, 2024

PR looks good to me. I just added one minor comment, please take a look at it.

@StefH
Copy link
Collaborator

StefH commented Sep 26, 2024

PR looks good to me. I just added one minor comment, please take a look at it.

I cannot see your comment? Did you save it?

@Xor-el
Copy link
Author

Xor-el commented Sep 26, 2024

PR looks good to me. I just added one minor comment, please take a look at it.

I cannot see your comment? Did you save it?

apologies, submitted now

@StefH StefH added question and removed feature labels Sep 28, 2024
@StefH StefH closed this as completed Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants