test: update trust anchor examples/fixtures for anchors array - #305
test: update trust anchor examples/fixtures for anchors array#305scouten-adobe wants to merge 3 commits into
Conversation
PR contentauth/c2pa-rs#2388 replaces Trust.trust_anchors / Trust.user_anchors with Trust.anchors (an array of TrustAnchor: trust_anchors, trust_uri, trust_kind). Update the commented-out example in sdk/examples/c2pa.toml and the two CLI trust fixtures that still used the old flat fields, so they match the schema once that PR lands. Verified cli/tests/integration.rs cawg_* tests still pass against current main (the unknown [[trust.anchors]] key is ignored until contentauth/c2pa-rs#2388 merges).
|
Closing as superseded. This was migrated from contentauth/c2pa-rs#2436 during the c2patool repo split, but both fixture files it touches ( Merging this PR as-is would actually break settings parsing: it conflicts with I found and fixed the identical issue while resolving merge conflicts on the sibling PR, contentauth/c2pa-rs#2436. Nothing here needs to be carried forward. |
Summary
PR contentauth/c2pa-rs#2545 replaces
Trust.trust_anchors/Trust.user_anchors(bothOption<String>) withTrust.anchors(Option<Vec<TrustAnchor>>), where eachTrustAnchorcarriestrust_anchors,trust_uri, andtrust_kind. This updates the remaining examples/fixtures that still use the old flat fields so they match the new schema once that PR lands:sdk/examples/c2pa.toml-- the commented-out[trust]template now shows[[trust.anchors]]instead of top-leveltrust_anchors/user_anchors. (Stays in contentauth/c2pa-rs --sdk/isn't part of this repo.)tests/fixtures/trust/cawg_sign_settings.tomlandtests/fixtures/trust/cawg_test_settings.toml-- both used[trust] trust_anchors = "..."(the C2PA-leveltrust, notcawg_trust, which is a separate, unaffected struct); restructured to[[trust.anchors]]withtrust_uriandtrust_kind = "signer", matching the conventioncontentauth/c2pa-rs#2388itself uses insdk/tests/fixtures/test_settings.toml.Test plan
cargo test -p c2patool --test integration cawgagainst currentmain-- all 4 CAWG integration tests still pass (the unknown[[trust.anchors]]key is currently ignored, sincemaindoesn't yet have theanchorsfield; this becomes load-bearing once fix: C2PA 2.3 reporting c2pa-rs#2388 merges).Migrated from contentauth/c2pa-rs#2436 as part of the c2patool repo split. Only the two
cli/tests/fixtures/trust/*.tomlchanges (nowtests/fixtures/trust/*.toml) carried over here; thesdk/examples/c2pa.tomledit stays in the c2pa-rs PR.