Skip to content

Commit

Permalink
work on TestDialContainerTCP
Browse files Browse the repository at this point in the history
  • Loading branch information
mikenye committed Nov 17, 2023
1 parent c8c5f7e commit d4416d5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pw-bordercontrol/cmd/bordercontrol/feeder_conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"time"

"github.com/stretchr/testify/assert"
"golang.org/x/net/nettest"
)

const MaxUint = ^uint(0)
Expand Down Expand Up @@ -125,3 +126,20 @@ func TestLookupContainerTCP(t *testing.T) {
})

}

func TestDialContainerTCP(t *testing.T) {

// prepare mocked server
srv, err := nettest.NewLocalListener("tcp4")
assert.NoError(t, err)
go func() {
t.Log("listening on:", srv.Addr())
for {
_, err := srv.Accept()
if err != nil {
assert.NoError(t, err)
}
}
}()

}

0 comments on commit d4416d5

Please sign in to comment.