forked from testcontainers/testcontainers-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWaitForContainerUnix.cs
More file actions
40 lines (35 loc) · 1.5 KB
/
WaitForContainerUnix.cs
File metadata and controls
40 lines (35 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
namespace DotNet.Testcontainers.Configurations
{
using System;
using System.Collections.Generic;
using System.Linq;
/// <inheritdoc cref="IWaitForContainerOS" />
internal sealed class WaitForContainerUnix : WaitForContainerOS
{
/// <inheritdoc />
public override IWaitForContainerOS UntilCommandIsCompleted(params string[] command)
{
return AddCustomWaitStrategy(new UntilUnixCommandIsCompleted(command));
}
/// <inheritdoc />
public override IWaitForContainerOS UntilCommandIsCompleted(string command, Action<IWaitStrategy> waitStrategyModifier = null)
{
return AddCustomWaitStrategy(new UntilUnixCommandIsCompleted(command), waitStrategyModifier);
}
/// <inheritdoc />
public override IWaitForContainerOS UntilCommandIsCompleted(IEnumerable<string> command, Action<IWaitStrategy> waitStrategyModifier = null)
{
return AddCustomWaitStrategy(new UntilUnixCommandIsCompleted(command.ToArray()), waitStrategyModifier);
}
/// <inheritdoc />
public override IWaitForContainerOS UntilPortIsAvailable(int port, Action<IWaitStrategy> waitStrategyModifier = null)
{
return UntilInternalTcpPortIsAvailable(port, waitStrategyModifier);
}
/// <inheritdoc />
public override IWaitForContainerOS UntilInternalTcpPortIsAvailable(int containerPort, Action<IWaitStrategy> waitStrategyModifier = null)
{
return AddCustomWaitStrategy(new UntilInternalTcpPortIsAvailableOnUnix(containerPort), waitStrategyModifier);
}
}
}