echo-server icon indicating copy to clipboard operation
echo-server copied to clipboard

Testing

Open HarryET opened this issue 2 years ago • 0 comments

Ensure that all Echo Server routes work before we merge PRs, this can be done by updating the rust functional tests. Below is a list of endpoints that need to be tested. We also then need integration tests to ensure that staging works fully before deploying to prod, we could then also run these tests against prod to flag any issues before customers notice

This could be made easier by #89 as then we can just enable the multi-tenancy endpoints when building/testing for multi-tenancy and not when we are just testing self-hosted, this would also aid #66

We also then need to test specific parts of the logic so that we ensure everything works, there is a section below which also documents what parts should have some form of tests.

As a whole this issue will cause some refactors to the codebase to make it more re-useable as well as more testable

## Endpoints
- [x] `GET /health`
- [x] `POST /clients`
- [x] `DELETE /clients/:id`
- [ ] `POST /clients/:id` (encrypted)
- [ ] `POST /clients/:id` (json blob)
- [ ] `POST /tenants`
- [ ] `GET /tenants`
- [ ] `DELETE /tenants/:id`
- [ ] `POST /tenants/:id/apns`
- [ ] `POST /tenants/:id/fcm`
- [ ] `POST /:tenant_id/clients`
- [ ] `DELETE /:tenant_id/clients/:id`
- [ ] `POST /:tenant_id/clients/:id` (encrypted)
- [ ] `POST /:tenant_id/clients/:id` (json blob)

Use Cases

  • [ ] Single Tenancy
  • [ ] Multi Tenancy

Logic

  • [ ] Blob decoding
  • [ ] Config (loading from env)
  • [ ] Fetching/creating push provider
    • [ ] FCM
    • [ ] APNS
    • [ ] APNS Sandbox
  • [ ] Validating signatures
  • [ ] Fetching relay public key
  • [ ] Stores
    • [ ] Client
    • [ ] Notification
    • [ ] Tenants

HarryET avatar Jan 31 '23 20:01 HarryET