Hivemapper / odc-api

Software and APIs used to run the Open Dashcam (ODC) devices that collect data on the Hivemapper Mapping Network
11 stars 6 forks source link

ODC-API E2E Test -- Investigate using http endpoints for all tests. #206

Closed mazar-farran closed 2 months ago

mazar-farran commented 4 months ago

Currently, the end-to-end test uses shell scripts that compare files produced by ODC-API to a reference.

It would be better if we make use of the HTTP endpoints (like /metadata) and use those for comparison instead.

This accomplishes two things

  1. We would now also be covering the endpoint code, so we'd know if there was a regression there.
  2. We can use more mature test frameworks. Testing a backend server is a common scenario, so there are definitely good frameworks to cover this.
Masaya-RT commented 4 months ago

Using a webserver framework for testing instead of current -> tried using supertests (in code base) but not currently working as expected. Deep dive to see what can be done.

mazar-farran commented 2 months ago

Won't do