gabriel / muse public
test minor task/pack-origin-tests #1 / 1
gabriel · 169 days ago · Apr 12, 2026 · Diff

test: add pack_origin and build_msign_header test coverage

- TestParseRemoteInfo: 6 new cases for pack_origin field (populated, absent, whitespace-stripped, null value, empty string, whitespace-only) - TestBuildMsignHeader: 7 unit tests verifying header format, timestamp freshness, Ed25519 verifiability, query-string inclusion, None body, method/body influence on signature, handle embedding - tests/test_push_pack_origin.py: 8 integration tests for pack_origin URL rewriting in _push_objects_as_packs (origin replacement, scheme swap, path preservation, no-op without pack_origin, multi-pack, totals)

sha256:33bc4096adb87ff25fc548c5479faa2477cfbcfd19498802a88c426cd9e41759 sha
+37 ~6 symbols
sha256:d892037a0c91ebf33254a3ebaf184960a8b000c6b930403e162123a757b875e7 snapshot
+37
symbols added
~6
symbols modified
0
dead code introduced
Semantic Changes 43 symbols
~ tests/test_push_pack_origin.py .py 19 symbols added
+ TestPackOriginUrlRewriting class class TestPackOriginUrlRewriting L52–205
+ test_empty_object_list_no_pack_calls method method test_empty_object_list_no_pack_calls L121–137
+ test_http_to_https_scheme_swap method method test_http_to_https_scheme_swap L104–119
+ test_https_hub_replaced_with_worker_origin method method test_https_hub_replaced_with_worker_origin L71–86
+ test_multiple_packs_all_use_worker_url method method test_multiple_packs_all_use_worker_url L158–180
+ test_no_pack_origin_uses_hub_url_unchanged method method test_no_pack_origin_uses_hub_url_unchanged L88–102
+ test_origin_replaced_path_preserved method method test_origin_replaced_path_preserved L53–69
+ test_pack_origin_does_not_append_extra_path method method test_pack_origin_does_not_append_extra_path L139–156
+ test_stored_and_skipped_totals_accumulated method method test_stored_and_skipped_totals_accumulated L182–205
+ _make_transport function function _make_transport L28–37
+ _write_obj function function _write_obj L40–44
+ ObjectsChunkResponse import import ObjectsChunkResponse L20–20
+ _push_objects_as_packs import import _push_objects_as_packs L18–18
+ annotations import import annotations L9–9
+ hashlib import import hashlib L14–14
+ pathlib import import pathlib L11–11
+ pytest import import pytest L16–16
+ mock import import unittest.mock L12–12
+ write_object import import write_object L19–19
~ tests/test_core_transport.py .py 18 symbols added, 6 symbols modified
+ TestBuildMsignHeader class class TestBuildMsignHeader L172–312
+ _make_signing method method _make_signing L173–176
+ test_different_bodies_produce_different_sigs method method test_different_bodies_produce_different_sigs L289–302
+ test_different_methods_produce_different_headers method method test_different_methods_produce_different_headers L274–287
+ test_handle_embedded_in_header method method test_handle_embedded_in_header L304–312
+ test_header_format method method test_header_format L178–182
+ test_none_body_treated_as_empty_bytes method method test_none_body_treated_as_empty_bytes L248–272
+ test_query_string_included_in_canonical method method test_query_string_included_in_canonical L223–246
+ test_signature_is_verifiable method method test_signature_is_verifiable L194–221
+ test_timestamp_is_recent method method test_timestamp_is_recent L184–192
+ test_pack_origin_absent_when_not_in_response method method test_pack_origin_absent_when_not_in_response L139–142
+ test_pack_origin_empty_string_not_set method method test_pack_origin_empty_string_not_set L156–159
+ test_pack_origin_none_value_not_set method method test_pack_origin_none_value_not_set L151–154
+ test_pack_origin_populated_when_present method method test_pack_origin_populated_when_present L126–137
+ test_pack_origin_whitespace_only_not_set method method test_pack_origin_whitespace_only_not_set L161–164
+ test_pack_origin_whitespace_stripped method method test_pack_origin_whitespace_stripped L144–149
+ SigningIdentity import import SigningIdentity L20–20
+ build_msign_header import import build_msign_header L20–20
← Older Oldest on task/pack-origin-tests
All commits
Newer → Latest on task/pack-origin-tests

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:33bc4096adb87ff25fc548c5479faa2477cfbcfd19498802a88c426cd9e41759 --body "your comment"