diff options
author | Nayana Bidari <nybidari@google.com> | 2020-01-09 15:38:28 -0800 |
---|---|---|
committer | Nayana Bidari <nybidari@google.com> | 2020-01-09 15:38:28 -0800 |
commit | 04abc9cf558930472605bf740a4333d6fafe5930 (patch) | |
tree | d65f2f37959f772a416ae75ebd0d269050fc9f8d /test/iptables/iptables_test.go | |
parent | 6cc8e2d814f99439e01c308e16f6631d75578ec0 (diff) |
Add test for redirect port
Fix the indentation and print statements.
Moved the NAT redirect tests to new file.
Added negative test to check redirect rule on ports other than
redirected port.
Diffstat (limited to 'test/iptables/iptables_test.go')
-rw-r--r-- | test/iptables/iptables_test.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/iptables/iptables_test.go b/test/iptables/iptables_test.go index d57ddc0fe..fce9247aa 100644 --- a/test/iptables/iptables_test.go +++ b/test/iptables/iptables_test.go @@ -178,9 +178,14 @@ func TestFilterInputDropDifferentUDPPort(t *testing.T) { } } -func TestFilterInputRedirectUDPPort(t *testing.T) { - if err := singleTest(FilterInputRedirectUDPPort{}); err != nil { +func TestFilterNATRedirectUDPPort(t *testing.T) { + if err := singleTest(FilterNATRedirectUDPPort{}); err != nil { t.Fatal(err) } } +func TestFilterNATDropUDP(t *testing.T) { + if err := singleTest(FilterNATDropUDP{}); err != nil { + t.Fatal(err) + } +} |