Skip to content

Commit

Permalink
feat: Add NAT driver network configuration (#1328)
Browse files Browse the repository at this point in the history
  • Loading branch information
HofmeisterAn authored Jan 2, 2025
1 parent 6b2b4dd commit 60f50b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
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

0 comments on commit 60f50b6

Please sign in to comment.