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

feat: Add NAT driver network configuration #1328

Merged
merged 1 commit into from
Jan 2, 2025
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
5 changes: 1 addition & 4 deletions src/Testcontainers.Pulsar/PulsarBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public override PulsarContainer Build()
waitStrategy = waitStrategy.UntilMessageIsLogged("Function worker service started");
}

var pulsarBuilder = WithWaitStrategy(waitStrategy);
var pulsarBuilder = DockerResourceConfiguration.WaitStrategies.Count() > 1 ? this : WithWaitStrategy(waitStrategy);
return new PulsarContainer(pulsarBuilder.DockerResourceConfiguration);
}

Expand Down Expand Up @@ -156,9 +156,6 @@ public Task<bool> UntilAsync(IContainer container)
/// <inheritdoc cref="IWaitUntil.UntilAsync" />
private async Task<bool> UntilAsync(PulsarContainer container)
{
_ = Guard.Argument(container, nameof(container))
.NotNull();

if (_authenticationEnabled && _authToken == null)
{
try
Expand Down
6 changes: 6 additions & 0 deletions src/Testcontainers/Configurations/Networks/NetworkDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ public readonly struct NetworkDriver
[PublicAPI]
public static readonly NetworkDriver Host = new NetworkDriver("host");

/// <summary>
/// Gets network driver nat.
/// </summary>
[PublicAPI]
public static readonly NetworkDriver Nat = new NetworkDriver("nat");

/// <summary>
/// Initializes a new instance of the <see cref="NetworkDriver" /> struct.
/// </summary>
Expand Down