bans: one ledger method makes a request's ban, one place decides observe mode (closes #444)
check / check (push) Successful in 5m40s
check / check (push) Successful in 5m40s
The ledger's BanForLimit, WouldBanForLimit, BanForAttack and WouldBanForAttack become Ban and WouldBan, which take the cause and the notes in one bans.Grounds. The waf's banForLimit and banForAttack fill in what differs and call banClient, the one function that tests observe mode on the way to a ban. Behaviour is unchanged; tests change only where they called the four methods. Model: opus-5-5
This commit was merged in pull request #469.
This commit is contained in:
1 parent
419ee1c441
commit
433d5cc0a9
10 files changed
+392
-261
No files matched your search
@@ -37,10 +37,10 @@ func TestAdminEndpointsAreOffWhileTheTokenIsUnset(t *testing.T) {
|
||||
"",
|
||||
map[string]string{metricsToken: token},
|
||||
)
|
||||
server.Ledger.BanForLimit(
|
||||
server.Ledger.Ban(
|
||||
netip.MustParsePrefix(otherClient+"/32"),
|
||||
clk.Now(),
|
||||
bans.Notes{},
|
||||
bans.Grounds{Cause: bans.CauseLimit},
|
||||
)
|
||||
before := server.Ledger.Snapshot()
|
||||
|
||||
|
||||
Reference in new issue
Block a user