diff --git a/models/proto/tcp/process_test.go b/models/proto/tcp/process_test.go index 2d84c2b..dfeea30 100644 --- a/models/proto/tcp/process_test.go +++ b/models/proto/tcp/process_test.go @@ -37,10 +37,10 @@ func TestJoin(t *testing.T) { pr3, pw3 := io.Pipe() pr4, pw4 := io.Pipe() - conn1 := WrapReadWriteCloser(pr, pw2) - conn2 := WrapReadWriteCloser(pr2, pw) - conn3 := WrapReadWriteCloser(pr3, pw4) - conn4 := WrapReadWriteCloser(pr4, pw3) + conn1 := WrapReadWriteCloser(pr, pw2, nil) + conn2 := WrapReadWriteCloser(pr2, pw, nil) + conn3 := WrapReadWriteCloser(pr3, pw4, nil) + conn4 := WrapReadWriteCloser(pr4, pw3, nil) go func() { Join(conn2, conn3) diff --git a/models/proto/tcp/tcp_test.go b/models/proto/tcp/tcp_test.go index 0f8f949..e58d670 100644 --- a/models/proto/tcp/tcp_test.go +++ b/models/proto/tcp/tcp_test.go @@ -28,8 +28,8 @@ func TestWithCompression(t *testing.T) { pr, pw := io.Pipe() pr2, pw2 := io.Pipe() - conn1 := WrapReadWriteCloser(pr, pw2) - conn2 := WrapReadWriteCloser(pr2, pw) + conn1 := WrapReadWriteCloser(pr, pw2, nil) + conn2 := WrapReadWriteCloser(pr2, pw, nil) compressionStream1 := WithCompression(conn1) compressionStream2 := WithCompression(conn2) @@ -71,12 +71,12 @@ func TestWithEncryption(t *testing.T) { pr5, pw5 := io.Pipe() pr6, pw6 := io.Pipe() - conn1 := WrapReadWriteCloser(pr, pw2) - conn2 := WrapReadWriteCloser(pr2, pw) - conn3 := WrapReadWriteCloser(pr3, pw4) - conn4 := WrapReadWriteCloser(pr4, pw3) - conn5 := WrapReadWriteCloser(pr5, pw6) - conn6 := WrapReadWriteCloser(pr6, pw5) + conn1 := WrapReadWriteCloser(pr, pw2, nil) + conn2 := WrapReadWriteCloser(pr2, pw, nil) + conn3 := WrapReadWriteCloser(pr3, pw4, nil) + conn4 := WrapReadWriteCloser(pr4, pw3, nil) + conn5 := WrapReadWriteCloser(pr5, pw6, nil) + conn6 := WrapReadWriteCloser(pr6, pw5, nil) encryptStream1, err := WithEncryption(conn3, []byte(key)) assert.NoError(err)