Skip to content

Commit 937fedf

Browse files
author
Casey Quinn
committed
test(portfwd): assert ipv6 removals
Signed-off-by: Casey Quinn <casey.quinn@agyn.io>
1 parent bbe4a1a commit 937fedf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/portfwd/forward_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ func TestForwarderIgnoreSkipsRemoval(t *testing.T) {
156156
listenerKey := key(tc.protocol, local, remote)
157157
tc.prepopulate(fw, listenerKey)
158158
fw.OnEvent(t.Context(), dial, &api.Event{RemovedLocalPorts: []*api.IPPort{port}})
159-
if tc.protocol == "tcp" {
159+
if tc.protocol == "tcp" || tc.protocol == "tcp6" {
160160
_, ok := fw.closableListeners.listeners[listenerKey]
161161
assert.Assert(t, ok, "tcp listener %s should not be removed", listenerKey)
162162
}
163-
if tc.protocol == "udp" {
163+
if tc.protocol == "udp" || tc.protocol == "udp6" {
164164
_, ok := fw.closableListeners.udpListeners[listenerKey]
165165
assert.Assert(t, ok, "udp listener %s should not be removed", listenerKey)
166166
}

0 commit comments

Comments
 (0)