summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/muxed/injectable_test.go
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2019-02-08 15:36:22 -0800
committerShentubot <shentubot@google.com>2019-02-08 15:37:20 -0800
commit967326131a875047c2b2d51bf4b2984ceefd4730 (patch)
tree6a56b0ec74f09cee3640ad2a8505dbe61b98cdec /pkg/tcpip/link/muxed/injectable_test.go
parentb2aa213dd2e19d88b4edf839d20e5bf51534be62 (diff)
Fix build error.
PiperOrigin-RevId: 233139020 Change-Id: I2e7089fa25d20e5662eb941054a684d41f5d3e12
Diffstat (limited to 'pkg/tcpip/link/muxed/injectable_test.go')
-rw-r--r--pkg/tcpip/link/muxed/injectable_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/pkg/tcpip/link/muxed/injectable_test.go b/pkg/tcpip/link/muxed/injectable_test.go
index 8a1a863ff..65db14b5d 100644
--- a/pkg/tcpip/link/muxed/injectable_test.go
+++ b/pkg/tcpip/link/muxed/injectable_test.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package injectable
+package muxed
import (
"bytes"
@@ -28,8 +28,8 @@ import (
"gvisor.googlesource.com/gvisor/pkg/tcpip/stack"
)
-func TestMuxedEndpointDispatch(t *testing.T) {
- endpoint, sock, dstIP := makeMuxedTestEndpoint(t)
+func TestInjectableEndpointDispatch(t *testing.T) {
+ endpoint, sock, dstIP := makeTestInjectableEndpoint(t)
hdr := buffer.NewPrependable(1)
hdr.Prepend(1)[0] = 0xFA
packetRoute := stack.Route{RemoteAddress: dstIP}
@@ -47,8 +47,8 @@ func TestMuxedEndpointDispatch(t *testing.T) {
}
}
-func TestMuxedEndpointDispatchHdrOnly(t *testing.T) {
- endpoint, sock, dstIP := makeMuxedTestEndpoint(t)
+func TestInjectableEndpointDispatchHdrOnly(t *testing.T) {
+ endpoint, sock, dstIP := makeTestInjectableEndpoint(t)
hdr := buffer.NewPrependable(1)
hdr.Prepend(1)[0] = 0xFA
packetRoute := stack.Route{RemoteAddress: dstIP}
@@ -64,7 +64,7 @@ func TestMuxedEndpointDispatchHdrOnly(t *testing.T) {
}
}
-func makeMuxedTestEndpoint(t *testing.T) (*MuxedInjectableEndpoint, *os.File, tcpip.Address) {
+func makeTestInjectableEndpoint(t *testing.T) (*InjectableEndpoint, *os.File, tcpip.Address) {
dstIP := tcpip.Address(net.ParseIP("1.2.3.4").To4())
pair, err := syscall.Socketpair(syscall.AF_UNIX,
syscall.SOCK_SEQPACKET|syscall.SOCK_CLOEXEC|syscall.SOCK_NONBLOCK, 0)
@@ -73,6 +73,6 @@ func makeMuxedTestEndpoint(t *testing.T) (*MuxedInjectableEndpoint, *os.File, tc
}
_, underlyingEndpoint := fdbased.NewInjectable(pair[1], 6500)
routes := map[tcpip.Address]stack.InjectableLinkEndpoint{dstIP: underlyingEndpoint}
- _, endpoint := NewMuxedInjectableEndpoint(routes, 6500)
+ _, endpoint := NewInjectableEndpoint(routes, 6500)
return endpoint, os.NewFile(uintptr(pair[0]), "test route end"), dstIP
}