MV-GH / LemmyBackwardsCompatibleAPI

Kotlin multiplatform Backward compatible Lemmy API
GNU Affero General Public License v3.0
4 stars 1 forks source link

Add EndToEnd tests for all endpoints #32

Open MV-GH opened 5 months ago

MV-GH commented 5 months ago

EndToEndTest success is defined as simply having a 2XX returned for a endpoint. We test serialization.

The only way we can reliably do this is by having a local docker instance running of a LemmyServer using TestContainers. The db should be preseeded with some data.

Then add a test for each endpoint

These tests should only be required to executed before the publishing. On demand otherwise.

dessalines commented 5 months ago

You could look at some of our end-to-end tests here, but they're mostly to test business-logic and federated operations. It might be a little overkill to replicate that with all its seed data here.