Skip to content

Add tests for stats processing #1879

@wojcik91

Description

@wojcik91

Implement tests with mock gateways to verify that peer stats are processed as expected.
Things to test:

  • new sessions are created once a first stats update comes
  • if a session already exists a duplicate is not created
  • if a session with state new already exists it's changed to connected once stats are received
  • peer updates for invalid keys are discarded
    - [ ] peer updates without an endpoint are discarded (this is done in the gateway handler)
  • peer updates in an invalid order are discarded
  • changing a device public key is handled properly
  • upload & download calculations work as expected
  • sessions are disconnected once enough time passes since last timestamp

Result: Integration tests for the session manager run in the CI (and can be run manually)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status

Ready to release

Relationships

None yet

Development

No branches or pull requests

Issue actions