chore: overhaul test file layout to and fix coverage #264
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Go reeeeally wants tests to live alongside its source code (boo), and to this point, we've separated tests to their own dir and generated coverage with some workarounds but those no longer work in recent versions of Go.
This PR:
teststo the rooteasypost.references to be removed since it's now in the local root project (throughout test files)bootstrap_test.go). This is because we cannot check the statement coverage until after the tests end and thus cannot check in codefixture_test.go)Testing
Coverage now reliably shows the statement coverage (before it was always 5% lower than actuality and would be variable), the HTML report also properly shows what's covered in each file where before it didn't.
I tested raising the coverage threshold and it "failed" with the proper error message and then I put it where we actually want it and coverage succeeded.
Pull Request Type
Please select the option(s) that are relevant to this PR.