Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbrazier committed Oct 30, 2019
1 parent 8fdeef6 commit 1e526fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/handler/ip_restrict_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ func TestIpAllowed(t *testing.T) {
{[]string{"10.1.1.1", "10.1.1.2"}, []string{"10.1.1.2"}, true}, // multiple allowedIPs
{[]string{"10.1.1.1/32"}, []string{"10.1.1.1"}, true}, // allowed CIDR
{[]string{"10.1.1.1/32"}, []string{"10.1.1.0"}, false}, // disallowed CIDR
{[]string{"10.1.1.1/28"}, []string{"10.1.1.0"}, false}, // first matching ip CIDR
{[]string{"10.1.1.1/28"}, []string{"10.1.1.15"}, false}, // last matching ip CIDR
{[]string{"10.1.1.1/28"}, []string{"10.1.1.0"}, true}, // first matching ip CIDR
{[]string{"10.1.1.1/28"}, []string{"10.1.1.15"}, true}, // last matching ip CIDR
{[]string{"10.1.1.1/28"}, []string{"10.1.1.16"}, false}, // first non matching matching ip CIDR
{[]string{"10.1.1.1/28"}, []string{"10.1.0.255"}, false}, // last non matching matching ip CIDR
}
Expand Down

0 comments on commit 1e526fb

Please sign in to comment.