mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 11:54:01 +03:00
Add EventReplayAttack
This commit is contained in:
@@ -228,6 +228,16 @@ func (suite *StatsdTestSuite) TestEventIPBlocklisted() {
|
||||
suite.Equal("mtg.ip_blocklisted:1|c", suite.statsdServer.String())
|
||||
}
|
||||
|
||||
func (suite *StatsdTestSuite) TestEventReplayAttack() {
|
||||
suite.statsd.EventReplayAttack(mtglib.EventReplayAttack{
|
||||
CreatedAt: time.Now(),
|
||||
ConnID: "connID",
|
||||
})
|
||||
|
||||
time.Sleep(statsdSleepTime)
|
||||
suite.Equal("mtg.replay_attacks:1|c", suite.statsdServer.String())
|
||||
}
|
||||
|
||||
func TestStatsd(t *testing.T) {
|
||||
t.Parallel()
|
||||
suite.Run(t, &StatsdTestSuite{})
|
||||
|
||||
Reference in New Issue
Block a user