Skip to content

Write down the testing policy - #43

Merged
norman-abramovitz merged 1 commit into
masterfrom
add-testing-policy
Jul 30, 2026
Merged

Write down the testing policy#43
norman-abramovitz merged 1 commit into
masterfrom
add-testing-policy

Conversation

@norman-abramovitz

Copy link
Copy Markdown
Contributor

Addresses the test_policy criterion in #39:

The project MUST have a general policy (formal or not) that as major new
functionality is added to the software produced by the project, tests of that
functionality should be added to an automated test suite.

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

  • New functionality arrives with tests covering it.
  • A bug fix arrives with a test that fails without the fix. Called out
    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 check and make test-race must both pass before merge; CI enforces
    both. make cover shows where a change leaves coverage.
  • Parsing changes deserve make fuzz. VCAP_APPLICATION and VCAP_SERVICES
    come 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 check clean.

Note this now brings three changelog.d fragments pending for the next release
(the v1.23.0 sweep, interim versions, and this one).

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.
@norman-abramovitz
norman-abramovitz merged commit 0125cf1 into master Jul 30, 2026
6 checks passed
@norman-abramovitz
norman-abramovitz deleted the add-testing-policy branch July 30, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant