tests.test_checksums module¶
Tests for the binary tool registry checksum update logic.
- tests.test_checksums.FIG_URL = 'https://github.com/orchard/fig/releases/download/v1.0.0/fig_linux_amd64'¶
A release artifact whose checksum a stubbed recompute reports as stale.
- tests.test_checksums.test_download_sha256_retries_a_failed_first_attempt()[source]¶
One connection reset does not end a download: the next attempt answers.
A batch downloads every binary of the registry, so one transient error must not abort it.
- tests.test_checksums.test_update_registry_checksums_replaces_stale_hash(tmp_path)[source]¶
update_registry_checksums replaces stale hashes in tooling/registry.py.
- tests.test_checksums.test_update_checksums_reports_each_outcome(outcome, exit_code, message)[source]¶
The command lists each rewritten hash, or ends on the error that stopped it.
The recompute is stubbed: the real one rewrites the installed registry.
- tests.test_checksums.test_update_registry_checksums_noop_when_current(tmp_path)[source]¶
update_registry_checksums does not rewrite when all hashes match.
- tests.test_checksums.test_update_registry_checksums_reconciles_version_stamp(tmp_path)[source]¶
A stale VERSIONS stamp is reconciled to the registry version.
- tests.test_checksums.test_update_registry_checksums_version_override(tmp_path)[source]¶
version_overrides downloads at the override version and stamps it.
Models the
sync-tool-versionsflow: the source was bumped (so the file holds the new version) while the in-memory registry still holds the old one, and the override drives both the download URL and the VERSIONS stamp.
- tests.test_checksums.test_update_registry_checksums_override_limits_the_run_to_its_tools(tmp_path)[source]¶
An override verifies the bumped tool alone, and stamps no other tool.
A version bump touches one or two tools: downloading the artifacts of every binary tool for it multiplied the run several times over. A tool left out keeps the stamp of its pinned version, which its checksums still match.
- tests.test_checksums.test_checksum_targets_cover_every_binary_platform()[source]¶
With no override, every platform of every binary tool is verified.
- tests.test_checksums.test_download_sha256_hands_the_named_asset_to_the_verifier()[source]¶
The verifier reads the download before the scratch directory goes.
- tests.test_checksums.test_verify_attestation_runs_the_check_upstream_supports(tool, expected, tmp_path)[source]¶
Each attestation level is verified by the
ghcommand that reads it.
