edanalytics / lightbeam

CLI tool for validating and transmitting payloads from JSONL files into an Ed-Fi API.
Apache License 2.0
10 stars 1 forks source link

adding a test suite; fixing version output #45

Closed tomreitz closed 1 month ago

tomreitz commented 2 months ago

This PR fixes a bug @megan-nash-ea pointed out where lightbeam send resulted in an error about lightbeam.get_endpoints_with_data() (which was recently refactored as part of the reference validation feature).

Discovering this bug, which really should have been preventable, led me to also add a test suite for lightbeam in this PR. Now, if you run lightbeam -t, lightbeam will run through a test suite against an Ed-Fi API you specify (recommended to use a local Docker deployment of the stock Ed-Fi API populated with the Grand Bend dataset). The tests cover all lightbeam commands: count, fetch, send, delete, and truncate. The test suite is designed to minimize impact on the API and to un-do any changes it does make. See lightbeam/tests/README.md for details about exactly what tests are run.

tomreitz commented 1 month ago

@johncmerfeld updated the test suite to use pytest instead of a user-facing flag

tomreitz commented 1 month ago

Left a couple notes but I think this is great! Really excited to continue building on it in the future and hopefully someday use it to automatically check code before merges!

Thanks much, @johncmerfeld ! Appreciate the review. I addressed a few of your comments - give this a 👍 if I can merge this PR now.

johncmerfeld commented 1 month ago

Thanks much, @johncmerfeld ! Appreciate the review. I addressed a few of your comments - give this a 👍 if I can merge this PR now.

Looking great -- I fully endorse merging!