Implement tests with mock gateways to verify that peer stats are processed as expected. Things to test: - [x] new sessions are created once a first stats update comes - [x] if a session already exists a duplicate is not created - [x] if a session with state `new` already exists it's changed to `connected` once stats are received - [x] peer updates for invalid keys are discarded ~- [ ] peer updates without an endpoint are discarded~ (this is done in the gateway handler) - [x] peer updates in an invalid order are discarded - [x] changing a device public key is handled properly - [x] upload & download calculations work as expected - [x] 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)
Implement tests with mock gateways to verify that peer stats are processed as expected.
Things to test:
newalready exists it's changed toconnectedonce stats are received- [ ] peer updates without an endpoint are discarded(this is done in the gateway handler)Result: Integration tests for the session manager run in the CI (and can be run manually)