From 42edeb12b3a78d85b033fd0b52a5f0226fe51461 Mon Sep 17 00:00:00 2001 From: onee-only Date: Tue, 16 Jul 2024 20:55:41 +0900 Subject: [PATCH] Temporary testnetwork setup --- internal/exec/resource.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/internal/exec/resource.go b/internal/exec/resource.go index 5ee8a6a..c901031 100644 --- a/internal/exec/resource.go +++ b/internal/exec/resource.go @@ -11,7 +11,6 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/image" - "github.com/docker/docker/api/types/network" "github.com/docker/go-connections/nat" "github.com/google/uuid" "github.com/influxdata/influxdb-client-go/api/write" @@ -73,7 +72,7 @@ func (e *Executor) setupResources( } hostConf := &container.HostConfig{ - NetworkMode: container.NetworkMode(e.ExecNetwork), + NetworkMode: container.NetworkMode(e.TestNetwork), Resources: container.Resources{ Memory: int64(resource.Memory), CPUPeriod: defaultCPUPeriod, @@ -109,11 +108,11 @@ func (e *Executor) setupResources( // primary process should be connected to the test network. e.Log.Info("resource is primary. connecting to test network") - if err := e.Docker.NetworkConnect(ctx, e.TestNetwork, con.ID, &network.EndpointSettings{ - DNSNames: []string{resource.Name}, - }); err != nil { - return errors.Wrap(err, "connecting primary process to test network") - } + // if err := e.Docker.NetworkConnect(ctx, e.TestNetwork, con.ID, &network.EndpointSettings{ + // DNSNames: []string{resource.Name}, + // }); err != nil { + // return errors.Wrap(err, "connecting primary process to test network") + // } } if err := e.Docker.ContainerStart(ctx, con.ID, container.StartOptions{}); err != nil {