mirror of
				https://github.com/tailscale/tailscale.git
				synced 2025-10-31 00:01:40 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			467 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			467 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
 | |
| // Use of this source code is governed by a BSD-style
 | |
| // license that can be found in the LICENSE file.
 | |
| 
 | |
| package nettest
 | |
| 
 | |
| import (
 | |
| 	"net"
 | |
| 	"testing"
 | |
| 
 | |
| 	"golang.org/x/net/nettest"
 | |
| )
 | |
| 
 | |
| func TestConn(t *testing.T) {
 | |
| 	nettest.TestConn(t, func() (c1 net.Conn, c2 net.Conn, stop func(), err error) {
 | |
| 		c1, c2 = NewConn("test", bufferSize)
 | |
| 		return c1, c2, func() {
 | |
| 			c1.Close()
 | |
| 			c2.Close()
 | |
| 		}, nil
 | |
| 	})
 | |
| }
 |