mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-02 00:11:56 +03:00
Add EventReplayAttack
This commit is contained in:
@@ -87,6 +87,16 @@ func (suite *EventsTestSuite) TestEventIPBlocklisted() {
|
||||
suite.WithinDuration(time.Now(), evt.Timestamp(), 10*time.Millisecond)
|
||||
}
|
||||
|
||||
func (suite *EventsTestSuite) TestEventReplayAttack() {
|
||||
evt := mtglib.EventReplayAttack{
|
||||
CreatedAt: time.Now(),
|
||||
ConnID: "CONNID",
|
||||
}
|
||||
|
||||
suite.Equal("CONNID", evt.StreamID())
|
||||
suite.WithinDuration(time.Now(), evt.Timestamp(), 10*time.Millisecond)
|
||||
}
|
||||
|
||||
func TestEvents(t *testing.T) {
|
||||
t.Parallel()
|
||||
suite.Run(t, &EventsTestSuite{})
|
||||
|
||||
Reference in New Issue
Block a user