Write down the testing policy - #43
Merged
Merged
Conversation
The practice was already followed -- every feature in v1.20.0 through v1.22.0 shipped with tests and coverage rose 89.4% to 93.6% -- but it was never stated, so a contributor had to infer it and OpenSSF repo criterion test_policy had nothing to point at. Says the part that is easy to get wrong: a bug fix needs a test that fails without the fix. A test written afterwards proves the code does what it does, not that it catches the bug.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Addresses the
test_policycriterion in #39:The practice was already followed — every feature in v1.20.0 through v1.22.0
shipped with tests and coverage rose from 89.4% to 93.6% — but it was never
written down. A contributor had to infer it, and the criterion had nothing to
point at.
What the policy says
explicitly because it is the part that is easy to get wrong: a test written
after the fix proves the code does what it does, not that it catches the bug.
make checkandmake test-racemust both pass before merge; CI enforcesboth.
make covershows where a change leaves coverage.make fuzz.VCAP_APPLICATIONandVCAP_SERVICEScome from the platform and from bound brokers rather than from the
application, so this package is a trust boundary: it must return an error or a
value for any input, and never panic.
Scope
Documentation only — no code, no build changes.
make checkclean.Note this now brings three
changelog.dfragments pending for the next release(the v1.23.0 sweep, interim versions, and this one).