Skip to content

Commit

Permalink
Remove broken IP address parse test
Browse files Browse the repository at this point in the history
net.ParseIP no longer supports parsing IP addresses with leading zeroes: golang/go#30999
  • Loading branch information
wolffberg committed Sep 30, 2022
1 parent eaf2127 commit 3cdb867
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions internal/provider/hash_ip_string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,9 @@ import (
)

func TestHashIPString(t *testing.T) {
ipv4 := []string{"192.168.0.1", "192.168.000.001"}
ipv6 := []string{"fdd5:e282::dead:beef:cafe:babe", "FDD5:E282:0000:0000:DEAD:BEEF:CAFE:BABE"}
invalid := "not.an.ip.address"

if hashIPString(ipv4[0]) != hashIPString(ipv4[1]) {
t.Errorf("IPv4 values %s and %s should hash to the same value", ipv4[0], ipv4[1])
}

if hashIPString(ipv6[0]) != hashIPString(ipv6[1]) {
t.Errorf("IPv6 values %s and %s should hash to the same value", ipv6[0], ipv6[1])
}
Expand Down

0 comments on commit 3cdb867

Please sign in to comment.