mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
integration/container: wrap some long lines for readability
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 54ca929a70
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
653b58cc8a
commit
b41e2d4dc1
1 changed files with 17 additions and 9 deletions
|
@ -70,7 +70,11 @@ func TestNetworkLoopbackNat(t *testing.T) {
|
|||
client := testEnv.APIClient()
|
||||
ctx := context.Background()
|
||||
|
||||
cID := container.Run(ctx, t, client, container.WithCmd("sh", "-c", fmt.Sprintf("stty raw && nc -w 1 %s 8080", endpoint.String())), container.WithTty(true), container.WithNetworkMode("container:"+serverContainerID))
|
||||
cID := container.Run(ctx, t, client,
|
||||
container.WithCmd("sh", "-c", fmt.Sprintf("stty raw && nc -w 1 %s 8080", endpoint.String())),
|
||||
container.WithTty(true),
|
||||
container.WithNetworkMode("container:"+serverContainerID),
|
||||
)
|
||||
|
||||
poll.WaitOn(t, container.IsStopped(ctx, client, cID), poll.WithDelay(100*time.Millisecond))
|
||||
|
||||
|
@ -92,7 +96,11 @@ func startServerContainer(t *testing.T, msg string, port int) string {
|
|||
client := testEnv.APIClient()
|
||||
ctx := context.Background()
|
||||
|
||||
cID := container.Run(ctx, t, client, container.WithName("server-"+t.Name()), container.WithCmd("sh", "-c", fmt.Sprintf("echo %q | nc -lp %d", msg, port)), container.WithExposedPorts(fmt.Sprintf("%d/tcp", port)), func(c *container.TestContainerConfig) {
|
||||
cID := container.Run(ctx, t, client,
|
||||
container.WithName("server-"+t.Name()),
|
||||
container.WithCmd("sh", "-c", fmt.Sprintf("echo %q | nc -lp %d", msg, port)),
|
||||
container.WithExposedPorts(fmt.Sprintf("%d/tcp", port)),
|
||||
func(c *container.TestContainerConfig) {
|
||||
c.HostConfig.PortBindings = nat.PortMap{
|
||||
nat.Port(fmt.Sprintf("%d/tcp", port)): []nat.PortBinding{
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue