defender: allow hot-reloading for safe and block lists

This commit is contained in:
Nicola Murino
2021-01-04 17:52:14 +01:00
parent c3410a3d91
commit 72b2c83392
11 changed files with 68 additions and 68 deletions

View File

@@ -235,6 +235,8 @@ func TestDefenderIntegration(t *testing.T) {
ip := "127.1.1.1"
assert.Nil(t, ReloadDefender())
AddDefenderEvent(ip, HostEventNoLoginTried)
assert.False(t, IsBanned(ip))
@@ -258,6 +260,7 @@ func TestDefenderIntegration(t *testing.T) {
Config.DefenderConfig.Threshold = 3
err = Initialize(Config)
assert.NoError(t, err)
assert.Nil(t, ReloadDefender())
AddDefenderEvent(ip, HostEventNoLoginTried)
assert.False(t, IsBanned(ip))