matheusgomes28 / urchin

Headless CMS written in Golang
MIT License
70 stars 21 forks source link

System Tests with full in memory DB support #57

Closed matheusgomes28 closed 7 months ago

matheusgomes28 commented 7 months ago

This PR implements full system tests / end2end tests using an in memory mysql databse. The motivation for this work was to get coverage for the lines that require a real db connection.

These tests are still expensive to run, as the internal DB server needs to be started (~50ms), so only need to have system tests for fully testing a feature. Leave smaller tests for unit tests.

codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 90.38462% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 34.64%. Comparing base (4f0c2c6) to head (42550f9).

Files Patch % Lines
tests/system_tests/endpoint_tests/helpers.go 90.38% 3 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #57 +/- ## ========================================== + Coverage 24.96% 34.64% +9.68% ========================================== Files 14 15 +1 Lines 661 713 +52 ========================================== + Hits 165 247 +82 + Misses 477 440 -37 - Partials 19 26 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.