feat(authn) : add case to test multiples CIDR #34 #35
@ -39,6 +39,23 @@ func TestMatchAuthorizedCIDRs(t *testing.T) {
|
|||||||
},
|
},
|
||||||
ExpectedResult: false,
|
ExpectedResult: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
RemoteHostPort: "192.168.1.15:43349",
|
||||||
|
AuthorizedCIDRs: []string{
|
||||||
|
"192.168.1.5/32",
|
||||||
|
"192.168.1.0/24",
|
||||||
|
},
|
||||||
|
ExpectedResult: true,
|
||||||
wpetit marked this conversation as resolved
Outdated
|
|||||||
|
},
|
||||||
|
{
|
||||||
|
RemoteHostPort: "192.168.1.15:43349",
|
||||||
|
AuthorizedCIDRs: []string{
|
||||||
|
"192.168.1.5/32",
|
||||||
|
"192.168.1.6/32",
|
||||||
|
"192.168.1.7/32",
|
||||||
|
},
|
||||||
|
ExpectedResult: false,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
auth := Authenticator{}
|
auth := Authenticator{}
|
||||||
|
Loading…
Reference in New Issue
Block a user
Le résultat attendu me semble erroné. L'IP
192.168.1.15
est bien contenu dans le réseau192.168.1.0/24
, le résultat sera donctrue
. Est ce une erreur ?