Skip to content

Commit 60f50b6

Browse files
authored
feat: Add NAT driver network configuration (#1328)
1 parent 6b2b4dd commit 60f50b6

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/Testcontainers.Pulsar/PulsarBuilder.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public override PulsarContainer Build()
7575
waitStrategy = waitStrategy.UntilMessageIsLogged("Function worker service started");
7676
}
7777

78-
var pulsarBuilder = WithWaitStrategy(waitStrategy);
78+
var pulsarBuilder = DockerResourceConfiguration.WaitStrategies.Count() > 1 ? this : WithWaitStrategy(waitStrategy);
7979
return new PulsarContainer(pulsarBuilder.DockerResourceConfiguration);
8080
}
8181

@@ -156,9 +156,6 @@ public Task<bool> UntilAsync(IContainer container)
156156
/// <inheritdoc cref="IWaitUntil.UntilAsync" />
157157
private async Task<bool> UntilAsync(PulsarContainer container)
158158
{
159-
_ = Guard.Argument(container, nameof(container))
160-
.NotNull();
161-
162159
if (_authenticationEnabled && _authToken == null)
163160
{
164161
try

src/Testcontainers/Configurations/Networks/NetworkDriver.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ public readonly struct NetworkDriver
2020
[PublicAPI]
2121
public static readonly NetworkDriver Host = new NetworkDriver("host");
2222

23+
/// <summary>
24+
/// Gets network driver nat.
25+
/// </summary>
26+
[PublicAPI]
27+
public static readonly NetworkDriver Nat = new NetworkDriver("nat");
28+
2329
/// <summary>
2430
/// Initializes a new instance of the <see cref="NetworkDriver" /> struct.
2531
/// </summary>

0 commit comments

Comments
 (0)