From 72a30b11486b48394fa0edca500b80e4ca83b10c Mon Sep 17 00:00:00 2001 From: Arthur Sfez Date: Tue, 15 Sep 2020 14:47:34 -0700 Subject: Move reusable IPv4 test code into a testutil module and refactor it The refactor aims to simplify the package, by replacing the Go channel with a PacketBuffer slice. This code will be reused by tests for IPv6 fragmentation. PiperOrigin-RevId: 331860411 --- pkg/tcpip/network/testutil/BUILD | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pkg/tcpip/network/testutil/BUILD (limited to 'pkg/tcpip/network/testutil/BUILD') diff --git a/pkg/tcpip/network/testutil/BUILD b/pkg/tcpip/network/testutil/BUILD new file mode 100644 index 000000000..e218563d0 --- /dev/null +++ b/pkg/tcpip/network/testutil/BUILD @@ -0,0 +1,17 @@ +load("//tools:defs.bzl", "go_library") + +package(licenses = ["notice"]) + +go_library( + name = "testutil", + srcs = [ + "testutil.go", + ], + visibility = ["//pkg/tcpip/network/ipv4:__pkg__"], + deps = [ + "//pkg/tcpip", + "//pkg/tcpip/buffer", + "//pkg/tcpip/link/channel", + "//pkg/tcpip/stack", + ], +) -- cgit v1.2.3