zimeon / ocfl-py

OCFL tools in Python
MIT License
20 stars 6 forks source link

Generate E064 for fixture E060_E064_root_inventory_digest_mismatch #51

Closed zimeon closed 3 years ago

zimeon commented 3 years ago

See https://github.com/OCFL/fixtures/pull/75

zimeon commented 3 years ago

root and latest/v1 inventories do not match:

fixtures> diff 1.0/bad-objects/E060_E064_root_inventory_digest_mismatch/inventory.json 1.0/bad-objects/E060_E064_root_inventory_digest_mismatch/v1/inventory.json
20c20
<       "message": "Changed!",
---
>       "message": "Simple example",
zimeon commented 3 years ago

For the particular test in question #61 results in:

../ocfl-validate.py 1.0/bad-objects/E060_E064_root_inventory_digest_mismatch
[E060] Mismatch between actual and recorded inventory digests for inventory.json (calculated 5bf08b6519f6692cc83f3d275de1f02414a41972d069ac167c5cf34468fad82ae621c67e1ff58a8ef15d5f58a193aa1f037f588372bdfc33ae6c38a2b349d846 but read cb7a451c595050e0e50d979b79bce86e28728b8557a3cf4ea430114278b5411c7bad6a7ecc1f4d0250e94f9d8add3b648194d75a74c0cb14c4439f427829569e from inventory.json.sha512) (see https://ocfl.io/1.0/spec/#E060)
[E064] Object root inventory and copy in last version MUST be identical but are not (inventory.json and v1/inventory.json) (see https://ocfl.io/1.0/spec/#E064)
INFO:ocfl.object:OCFL object at 1.0/bad-objects/E060_E064_root_inventory_digest_mismatch is INVALID

which is what I want. This work ended up with a number of changes to improve testing of paths in the manifest and to avoid short circuiting the inventory tests too soon.

zimeon commented 3 years ago

Fixed in 1.2.2