删除IP名单中某个IP时,也会删除WAF保存在内存中的名单中的IP

This commit is contained in:
刘祥超
2021-11-05 14:58:10 +08:00
parent 87cc43b2e0
commit 2063015eeb
3 changed files with 20 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ func TestIPList_Contains(t *testing.T) {
for i := 0; i < 1_0000; i++ {
list.Add(IPTypeAll, firewallconfigs.FirewallScopeGlobal, 1, "192.168.1."+strconv.Itoa(i), time.Now().Unix()+3600)
}
//list.RemoveIP("192.168.1.100")
a.IsTrue(list.Contains(IPTypeAll, firewallconfigs.FirewallScopeGlobal, 1, "192.168.1.100"))
a.IsFalse(list.Contains(IPTypeAll, firewallconfigs.FirewallScopeGlobal, 1, "192.168.2.100"))
}