diff --git a/pkgs/id/src/web/routes.rs b/pkgs/id/src/web/routes.rs index 69e188bfdb..fa49906ab9 100644 --- a/pkgs/id/src/web/routes.rs +++ b/pkgs/id/src/web/routes.rs @@ -3950,7 +3950,7 @@ mod collab_route_tests { doc_id } - async fn get(uri: &str) -> (StatusCode, String) { + async fn get_doc(uri: &str) -> (StatusCode, String) { let app = Router::new().route("/ws/collab/{doc_id}", get(echo_doc_id)); let response = app .oneshot(Request::builder().uri(uri).body(Body::empty()).unwrap()) @@ -3964,7 +3964,7 @@ mod collab_route_tests { #[tokio::test] async fn encoded_slash_round_trips_to_the_exact_filename() { assert_eq!( - get("/ws/collab/a%2Fb.md").await, + get_doc("/ws/collab/a%2Fb.md").await, (StatusCode::OK, "a/b.md".to_owned()) ); } @@ -3973,21 +3973,21 @@ mod collab_route_tests { async fn encoded_percent_names_round_trip() { // a%20b.md the file, not "a b.md": the client sends a%2520b.md. assert_eq!( - get("/ws/collab/a%2520b.md").await, + get_doc("/ws/collab/a%2520b.md").await, (StatusCode::OK, "a%20b.md".to_owned()) ); assert_eq!( - get("/ws/collab/100%25.md").await, + get_doc("/ws/collab/100%25.md").await, (StatusCode::OK, "100%.md".to_owned()) ); assert_eq!( - get("/ws/collab/notes.md").await, + get_doc("/ws/collab/notes.md").await, (StatusCode::OK, "notes.md".to_owned()) ); } #[tokio::test] async fn a_real_second_segment_does_not_match() { - assert_eq!(get("/ws/collab/a/b.md").await.0, StatusCode::NOT_FOUND); + assert_eq!(get_doc("/ws/collab/a/b.md").await.0, StatusCode::NOT_FOUND); } } diff --git a/pkgs/id/tests/aliases.rs b/pkgs/id/tests/aliases.rs index 182557b485..9969db75c4 100644 --- a/pkgs/id/tests/aliases.rs +++ b/pkgs/id/tests/aliases.rs @@ -60,6 +60,7 @@ impl Writer { document: None, removes: None, note: None, + link: None, }; let event = sign(&self.key, self.seq, self.last, None, ext).unwrap(); self.seq += 1; diff --git a/pkgs/id/tests/bridge_poc.rs b/pkgs/id/tests/bridge_poc.rs index c3373ee160..8288a14f4f 100644 --- a/pkgs/id/tests/bridge_poc.rs +++ b/pkgs/id/tests/bridge_poc.rs @@ -164,6 +164,7 @@ impl Author { document: None, removes: None, note: None, + link: None, }; let event = sign(&self.key, self.seq, self.last, None, ext).unwrap(); self.seq += 1; @@ -195,6 +196,7 @@ impl Author { document: None, removes: None, note: None, + link: None, }; sign(&self.key, seq, backlink, Some(b"rival"), ext).unwrap() } diff --git a/pkgs/id/tests/chain_properties.rs b/pkgs/id/tests/chain_properties.rs index 6a0d2babd9..9f6d7e931f 100644 --- a/pkgs/id/tests/chain_properties.rs +++ b/pkgs/id/tests/chain_properties.rs @@ -62,6 +62,7 @@ fn chain_ext() -> impl Strategy { document: None, removes: None, note: None, + link: None, } }) } @@ -122,6 +123,7 @@ proptest! { kind: "m".to_owned(), group: None, after: after.clone(), tag: None, document: None, removes: None, note: None, + link: None, }; prop_assert!(sign(&key(), 0, None, None, ext.clone()).is_err()); prop_assert!(ext.validate().is_err()); @@ -189,6 +191,7 @@ proptest! { kind: "m".to_owned(), group: None, after: Vec::new(), tag: None, document: None, removes: None, note: None, + link: None, }, ) .encode(); diff --git a/pkgs/id/tests/cli_documents.rs b/pkgs/id/tests/cli_documents.rs index 278bbf89a7..89a97ba262 100644 --- a/pkgs/id/tests/cli_documents.rs +++ b/pkgs/id/tests/cli_documents.rs @@ -196,6 +196,7 @@ fn test_events_lists_the_tags_and_a_removal_on_a_document() { document: None, removes: Some(hash(&doc)), note: None, + link: None, }, ); diff --git a/pkgs/id/tests/content_removal.rs b/pkgs/id/tests/content_removal.rs index 8b58734edc..74575bb017 100644 --- a/pkgs/id/tests/content_removal.rs +++ b/pkgs/id/tests/content_removal.rs @@ -97,6 +97,7 @@ fn document_ext(doc: &DocumentRef, after: Vec) -> ChainExt { document: Some(doc.clone()), removes: None, note: None, + link: None, } } @@ -113,6 +114,7 @@ fn tag_ext(subject: Hash, name: &str, value: &str, after: Vec) -> ChainExt document: None, removes: None, note: None, + link: None, } } @@ -125,6 +127,7 @@ fn removal_ext(target: Hash, after: Vec) -> ChainExt { document: None, removes: Some(target), note: None, + link: None, } } diff --git a/pkgs/id/tests/crash/store.rs b/pkgs/id/tests/crash/store.rs index ad1fd0b4d8..6cca7ba107 100644 --- a/pkgs/id/tests/crash/store.rs +++ b/pkgs/id/tests/crash/store.rs @@ -435,6 +435,7 @@ fn workload() -> Vec> { document: None, removes: None, note: None, + link: None, }; let a0 = sign(&author, 0, None, None, ext("message", Vec::new())).unwrap(); let a1 = sign(&author, 1, Some(a0.id), None, ext("message", Vec::new())).unwrap(); diff --git a/pkgs/id/tests/documents.rs b/pkgs/id/tests/documents.rs index a1741d2c39..49f8c1e598 100644 --- a/pkgs/id/tests/documents.rs +++ b/pkgs/id/tests/documents.rs @@ -106,6 +106,7 @@ fn document_ext(doc: &DocumentRef, after: Vec) -> ChainExt { document: Some(doc.clone()), removes: None, note: None, + link: None, } } @@ -122,6 +123,7 @@ fn tag_ext(op: TagOp, after: Vec) -> ChainExt { document: None, removes: None, note: None, + link: None, } } @@ -380,6 +382,7 @@ fn test_a_document_event_that_does_not_fit_its_kind_is_not_signed() { document: None, removes: None, note: None, + link: None, }; assert!(sign(&key, 0, None, None, missing).is_err()); let with_tag = ChainExt { diff --git a/pkgs/id/tests/event_store_properties.rs b/pkgs/id/tests/event_store_properties.rs index 9b5c7626d1..9ff6052214 100644 --- a/pkgs/id/tests/event_store_properties.rs +++ b/pkgs/id/tests/event_store_properties.rs @@ -149,6 +149,7 @@ fn signed( document: None, removes: None, note: None, + link: None, }; sign(key, seq, backlink, None, ext).unwrap() } @@ -337,6 +338,7 @@ fn present_event( document: None, removes: None, note: None, + link: None, }; sign(key, seq, backlink, None, ext).unwrap() } @@ -758,6 +760,7 @@ proptest! { kind: "m".to_owned(), group: None, after: Vec::new(), tag: None, document: None, removes: None, note: None, + link: None, }, ) .encode(); @@ -802,6 +805,7 @@ fn print_ingest_seeds() { document: None, removes: None, note: None, + link: None, }; sign(key, seq, backlink, None, ext).unwrap() }; diff --git a/pkgs/id/tests/game_post_async_turns_poc.rs b/pkgs/id/tests/game_post_async_turns_poc.rs index 5c5d2e2713..fa751ed4be 100644 --- a/pkgs/id/tests/game_post_async_turns_poc.rs +++ b/pkgs/id/tests/game_post_async_turns_poc.rs @@ -3,7 +3,7 @@ //! The #2053 investigation modelled a playable post as a board post that binds a //! **game package**, a **play mode**, and a **state lineage**. This proves the //! `async-turns` half of that on the checked-in tic-tac-toe program -//! (`examples/tic-tac-toe/tic-tac-toe.wasm`), with four scope points: +//! (`apps/tic-tac-toe/program/tic-tac-toe.wasm`), with four scope points: //! //! 1. a **game-post object** naming the package (hash + version), the mode, the //! two players, and `attestation: concession`; @@ -29,7 +29,7 @@ use serde_json::{Value, json}; use sha2::{Digest, Sha256}; /// The tic-tac-toe program, exactly as an app package would ship it. -const PACKAGE_WASM: &[u8] = include_bytes!("../examples/tic-tac-toe/tic-tac-toe.wasm"); +const PACKAGE_WASM: &[u8] = include_bytes!("../apps/tic-tac-toe/program/tic-tac-toe.wasm"); /// The package version the posts in this file name. A bump is a new hash, and /// old posts keep running the version they named. const PACKAGE_VERSION: &str = "0.1.0"; diff --git a/pkgs/id/tests/production_ingest.rs b/pkgs/id/tests/production_ingest.rs index 35f0abc9f2..5ebdec5b01 100644 --- a/pkgs/id/tests/production_ingest.rs +++ b/pkgs/id/tests/production_ingest.rs @@ -79,6 +79,7 @@ impl Chains { document: None, removes: None, note: None, + link: None, }; let event = sign(&key(who), seq, backlink, body.as_deref(), ext).unwrap(); self.last.insert(who, (seq, event.id)); @@ -294,6 +295,7 @@ fn test_a_body_that_does_not_match_its_payload_hash_is_refused() { document: None, removes: None, note: None, + link: None, }, ) .unwrap(); diff --git a/pkgs/id/tests/search.rs b/pkgs/id/tests/search.rs index e59bc6ef47..dd7e805ad0 100644 --- a/pkgs/id/tests/search.rs +++ b/pkgs/id/tests/search.rs @@ -89,6 +89,7 @@ impl Writer { document: Some(document), removes: None, note: None, + link: None, }) } } @@ -102,6 +103,7 @@ fn tag_ext(kind: &str, op: TagOp, after: Vec) -> ChainExt { document: None, removes: None, note: None, + link: None, } } diff --git a/pkgs/id/tests/tag_claims.rs b/pkgs/id/tests/tag_claims.rs index 26328d6c89..9ea6c8e321 100644 --- a/pkgs/id/tests/tag_claims.rs +++ b/pkgs/id/tests/tag_claims.rs @@ -76,6 +76,7 @@ impl Writer { document: None, removes: None, note: None, + link: None, }; let event = sign(&self.key, self.seq, self.last, None, ext).unwrap(); self.seq += 1; @@ -263,6 +264,7 @@ fn test_a_tag_event_whose_operation_does_not_fit_its_kind_is_not_signed() { document: None, removes: None, note: None, + link: None, }; assert!(sign(&a.key, 0, None, None, mismatch).is_err()); let missing = ChainExt { @@ -273,6 +275,7 @@ fn test_a_tag_event_whose_operation_does_not_fit_its_kind_is_not_signed() { document: None, removes: None, note: None, + link: None, }; assert!(sign(&a.key, 0, None, None, missing).is_err()); } diff --git a/pkgs/id/tests/voiding_properties.rs b/pkgs/id/tests/voiding_properties.rs index de95d1cedc..e84b834bbe 100644 --- a/pkgs/id/tests/voiding_properties.rs +++ b/pkgs/id/tests/voiding_properties.rs @@ -147,6 +147,7 @@ fn scenario(seed: u64) -> Vec { document: None, removes: None, note: None, + link: None, }; let body = action.as_ref().map(|action| encode_body(action).unwrap()); let event = sign(&key(who), seq, backlink, body.as_deref(), ext).unwrap(); diff --git a/pkgs/id/tests/voiding_scenarios.rs b/pkgs/id/tests/voiding_scenarios.rs index a3c0a9fcdb..a09d4d74da 100644 --- a/pkgs/id/tests/voiding_scenarios.rs +++ b/pkgs/id/tests/voiding_scenarios.rs @@ -97,6 +97,7 @@ impl Builder { document: None, removes: None, note: None, + link: None, }; let body = action.as_ref().map(|action| encode_body(action).unwrap()); let event = sign(&key(who), seq, backlink, body.as_deref(), ext).unwrap();