Refactor tests #6
Reference in New Issue
Block a user
Delete Branch "refactor-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The current test suite has a bunch of low-value tests and a structure that gets in the way. Things that motivated this:
test_pipelock_yaml.py, stdout regex intest_dry_run_plan.py) instead of on the structured data behind that output. Brittle in both directions — passes when it shouldn't, breaks on unrelated formatting changes.test_manifest_runtime.py), which catches copy edits rather than real regressions.test_pipelock_sidecar_smoke.pyhand-rolls thedocker create→cp→startsequence in parallel with whatcli.py startalready does, so divergences in production code don't fail it.test_pipelock_image.pyis really an upstream-packaging canary and shouldn't run on every dev push.tests/run_tests.pyexists mostly to maintain a hand-curatedINTEGRATION_NAMESset — that classification should fall out of the directory layout, not a list someone has to remember to update.Goal: tighten the structure (split
tests/unit/vstests/integration/, drop the bespoke runner), and replace the low-value tests with ones that actually catch regressions — driving production code paths and asserting on structured data.Replace the hand-maintained INTEGRATION_NAMES classifier (and the bespoke run_tests.py around it) with a directory-driven split: tests/unit/ unit tests, always run tests/integration/ Docker-dependent, skip cleanly without Docker tests/canaries/ upstream-regression checks, opt-in via CLAUDE_BOTTLE_RUN_CANARIES=1 The pinned-pipelock-image check moves to the canary suite — it tests upstream packaging, not our code, so it shouldn't gate every dev push. A scheduled canaries.yml workflow runs it weekly. The manifest-runtime tests collapse the four assertRaises cases for distinct 'runtime' values into one subTest loop and drop the error-message-wording assertions; the contract is "any value is rejected", not "the error literally contains 'auto-detect'". Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>didericis-claude referenced this pull request2026-06-02 00:12:12 -04:00