mirror of
https://github.com/vishvananda/netlink
synced 2025-02-18 05:07:11 +00:00
Add requirements to conntrack tests
Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>
This commit is contained in:
parent
9ce265f69e
commit
8bead6f932
@ -77,6 +77,8 @@ func applyFilter(flowList []ConntrackFlow, ipv4Filter *ConntrackFilter, ipv6Filt
|
||||
// TestConntrackSocket test the opening of a NETFILTER family socket
|
||||
func TestConntrackSocket(t *testing.T) {
|
||||
skipUnlessRoot(t)
|
||||
setUpNetlinkTestWithKModule(t, "nf_conntrack")
|
||||
setUpNetlinkTestWithKModule(t, "nf_conntrack_netlink")
|
||||
|
||||
h, err := NewHandle(unix.NETLINK_NETFILTER)
|
||||
CheckErrorFail(t, err)
|
||||
@ -90,6 +92,10 @@ func TestConntrackSocket(t *testing.T) {
|
||||
// Creates some flows and checks that they are correctly fetched from the conntrack table
|
||||
func TestConntrackTableList(t *testing.T) {
|
||||
skipUnlessRoot(t)
|
||||
setUpNetlinkTestWithKModule(t, "nf_conntrack")
|
||||
setUpNetlinkTestWithKModule(t, "nf_conntrack_netlink")
|
||||
setUpNetlinkTestWithKModule(t, "nf_conntrack_ipv4")
|
||||
setUpNetlinkTestWithKModule(t, "nf_conntrack_ipv6")
|
||||
|
||||
// Creates a new namespace and bring up the loopback interface
|
||||
origns, ns, h := nsCreateAndEnter(t)
|
||||
@ -135,6 +141,9 @@ func TestConntrackTableList(t *testing.T) {
|
||||
// Creates some flows and then call the table flush
|
||||
func TestConntrackTableFlush(t *testing.T) {
|
||||
skipUnlessRoot(t)
|
||||
setUpNetlinkTestWithKModule(t, "nf_conntrack")
|
||||
setUpNetlinkTestWithKModule(t, "nf_conntrack_netlink")
|
||||
setUpNetlinkTestWithKModule(t, "nf_conntrack_ipv4")
|
||||
|
||||
// Creates a new namespace and bring up the loopback interface
|
||||
origns, ns, h := nsCreateAndEnter(t)
|
||||
@ -194,6 +203,9 @@ func TestConntrackTableFlush(t *testing.T) {
|
||||
// Creates 2 group of flows then deletes only one group and validates the result
|
||||
func TestConntrackTableDelete(t *testing.T) {
|
||||
skipUnlessRoot(t)
|
||||
setUpNetlinkTestWithKModule(t, "nf_conntrack")
|
||||
setUpNetlinkTestWithKModule(t, "nf_conntrack_netlink")
|
||||
setUpNetlinkTestWithKModule(t, "nf_conntrack_ipv4")
|
||||
|
||||
// Creates a new namespace and bring up the loopback interface
|
||||
origns, ns, h := nsCreateAndEnter(t)
|
||||
|
Loading…
Reference in New Issue
Block a user