Skip to content

Commit

Permalink
expand comment on test network stack
Browse files Browse the repository at this point in the history
  • Loading branch information
nklaassen committed Apr 30, 2024
1 parent edaed42 commit 8ef62be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/vnet/vnet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ func newTestPack(t *testing.T, ctx context.Context) *testPack {

// Create an isolated userspace networking stack that can be manipulated from test code. It will be
// connected to the VNet over the TUN interface. This emulates the host networking stack.
// This is a completely separate gvisor network stack than the one that will be created in NewManager -
// the two will be connected over a fake TUN interface. This exists so that the test can setup IP routes
// without affecting the host running the Test.
testStack, linkEndpoint, err := createStack()
require.NoError(t, err)

Expand Down Expand Up @@ -168,6 +171,7 @@ func TestVnetEcho(t *testing.T) {
require.NoError(t, err)
defer conn.Close()

// The newline is necessary so that the bufio.Scanner can read a line.
testString := "Hello, World!\n"
_, err = conn.Write([]byte(testString))
require.NoError(t, err)
Expand Down

0 comments on commit 8ef62be

Please sign in to comment.