Skip to content

Commit

Permalink
test(provider): improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
favonia committed Sep 24, 2024
1 parent 15517a4 commit 9b2e884
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions internal/provider/protocol/local_iface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func TestExtractInterfaceAddr(t *testing.T) {
prepareMockPP func(*mocks.MockPP)
}{
"ipaddr/4": {
&net.IPAddr{IP: net.ParseIP("127.0.0.1"), Zone: ""},
true, netip.MustParseAddr("127.0.0.1"),
&net.IPAddr{IP: net.ParseIP("1.2.3.4"), Zone: ""},
true, netip.MustParseAddr("1.2.3.4"),
nil,
},
"ipaddr/6/zone-123": {
Expand All @@ -58,6 +58,11 @@ func TestExtractInterfaceAddr(t *testing.T) {
"?0102", "iface")
},
},
"ipnet/4": {
&net.IPNet{IP: net.ParseIP("1.2.3.4"), Mask: net.CIDRMask(10, 22)},
true, netip.MustParseAddr("1.2.3.4"),
nil,
},
} {
t.Run(name, func(t *testing.T) {
t.Parallel()
Expand Down

0 comments on commit 9b2e884

Please sign in to comment.