Skip to content

Commit

Permalink
commenting
Browse files Browse the repository at this point in the history
  • Loading branch information
mikenye committed Nov 21, 2023
1 parent 9e2535c commit a1c6fcf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pw-bordercontrol/cmd/bordercontrol/feeder_conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ func TestProxyClientToServer(t *testing.T) {
wgServerConn.Wait()

// spin up client-side server & client connections
t.Log("preparing test client-side connections")
csClientConn, csServerConn := net.Pipe()

// method to signal goroutines to exit
Expand All @@ -565,14 +566,16 @@ func TestProxyClientToServer(t *testing.T) {
log.Logger,
)

// send data to be proxied
_, err = csClientConn.Write([]byte("Hello World!"))
// send data to be proxied from client-side
_, err = csServerConn.Write([]byte("Hello World!"))
assert.NoError(t, err)

// read data from the other end of the proxy
// read proxied data from the server-side
buf := make([]byte, 12)
_, err = ssServerConn.Read(buf)
assert.NoError(t, err)

// data should match!
assert.Equal(t, []byte("Hello World!"), buf)

pStatus.mu.Lock()
Expand Down

0 comments on commit a1c6fcf

Please sign in to comment.