headroom/scripts/tests
chopratejas 80f403db4a test(scripts): cover branch-aware _should_sync in sync-plugin-versions
PR #484 added branch-awareness to ``scripts/sync-plugin-versions.py``
(no-op on feature branches unless ``HEADROOM_SYNC_VERSIONS=1``). The
existing ``test_main_runs_plugin_only_version_sync`` test broke
because it didn't account for the new ``_should_sync`` gate — on a
feature branch the main() function early-returns and the subprocess
mock was never invoked, but actually the test broke earlier because
``_current_branch`` calls ``subprocess.run(..., capture_output=True,
text=True, check=False)`` and the test's lambda only accepted
``(command, cwd, check)``.

Fix: force ``_should_sync`` True in the existing test so it locks
the run-path, then add 4 new tests covering the branch-aware logic
itself (env override, main vs feature, git-unavailable defensive
no-op).
2026-05-19 12:49:21 -05:00
..
test_changelog_gen.py chore: renormalize line endings to LF 2026-04-24 15:33:30 +02:00
test_sync_plugin_versions.py test(scripts): cover branch-aware _should_sync in sync-plugin-versions 2026-05-19 12:49:21 -05:00
test_version_sync.py fix: make proxy upgrades version-aware 2026-05-09 15:58:27 -07:00