Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/WireMock.Net.Testcontainers/WireMockContainerBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,29 @@ public WireMockContainerBuilder WithWindowsImage()
return WithImage(OSPlatform.Windows);
}

/// <summary>
/// Sets a custom WireMock.Net image for which to create the container.
/// </summary>
/// <param name="image">The image name.</param>
/// <returns>A configured instance of <see cref="WireMockContainerBuilder"/></returns>
[PublicAPI]
public new WireMockContainerBuilder WithImage(string image)
{
return WithCustomImage(image);
}

/// <summary>
/// Sets a custom WireMock.Net image for which to create the container.
/// </summary>
/// <param name="image">The image name.</param>
/// <returns>A configured instance of <see cref="WireMockContainerBuilder"/></returns>
[PublicAPI]
public WireMockContainerBuilder WithCustomImage(string image)
{
_imageOS ??= TestcontainersUtils.GetImageOSAsync.Value.GetAwaiter().GetResult();
return base.WithImage(image);
}

/// <summary>
/// Set the admin username and password for the container (basic authentication).
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public async Task WireMockContainer_Build_WithImageAsText_And_StartAsync_and_Sto
}
else
{
wireMockContainerBuilder = wireMockContainerBuilder.WithImage("sheyenrath/wiremock.net");
wireMockContainerBuilder = wireMockContainerBuilder.WithImage("sheyenrath/wiremock.net-alpine");
}

var wireMockContainer = wireMockContainerBuilder.Build();
Expand Down
Loading