Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkgs/id/tests/aliases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ impl Writer {
removes: None,
note: None,
link: None,
checkpoint: None,
};
let event = sign(&self.key, self.seq, self.last, None, ext).unwrap();
self.seq += 1;
Expand Down
2 changes: 2 additions & 0 deletions pkgs/id/tests/bridge_poc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ impl Author {
removes: None,
note: None,
link: None,
checkpoint: None,
};
let event = sign(&self.key, self.seq, self.last, None, ext).unwrap();
self.seq += 1;
Expand Down Expand Up @@ -197,6 +198,7 @@ impl Author {
removes: None,
note: None,
link: None,
checkpoint: None,
};
sign(&self.key, seq, backlink, Some(b"rival"), ext).unwrap()
}
Expand Down
3 changes: 3 additions & 0 deletions pkgs/id/tests/chain_properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ fn chain_ext() -> impl Strategy<Value = ChainExt> {
removes: None,
note: None,
link: None,
checkpoint: None,
}
})
}
Expand Down Expand Up @@ -124,6 +125,7 @@ proptest! {
group: None,
after: after.clone(), tag: None, document: None, removes: None, note: None,
link: None,
checkpoint: None,
};
prop_assert!(sign(&key(), 0, None, None, ext.clone()).is_err());
prop_assert!(ext.validate().is_err());
Expand Down Expand Up @@ -192,6 +194,7 @@ proptest! {
group: None,
after: Vec::new(), tag: None, document: None, removes: None, note: None,
link: None,
checkpoint: None,
},
)
.encode();
Expand Down
1 change: 1 addition & 0 deletions pkgs/id/tests/cli_documents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ fn test_events_lists_the_tags_and_a_removal_on_a_document() {
removes: Some(hash(&doc)),
note: None,
link: None,
checkpoint: None,
},
);

Expand Down
3 changes: 3 additions & 0 deletions pkgs/id/tests/content_removal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ fn document_ext(doc: &DocumentRef, after: Vec<Hash>) -> ChainExt {
removes: None,
note: None,
link: None,
checkpoint: None,
}
}

Expand All @@ -115,6 +116,7 @@ fn tag_ext(subject: Hash, name: &str, value: &str, after: Vec<Hash>) -> ChainExt
removes: None,
note: None,
link: None,
checkpoint: None,
}
}

Expand All @@ -128,6 +130,7 @@ fn removal_ext(target: Hash, after: Vec<Hash>) -> ChainExt {
removes: Some(target),
note: None,
link: None,
checkpoint: None,
}
}

Expand Down
1 change: 1 addition & 0 deletions pkgs/id/tests/crash/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ fn workload() -> Vec<Vec<u8>> {
removes: None,
note: None,
link: None,
checkpoint: 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();
Expand Down
3 changes: 3 additions & 0 deletions pkgs/id/tests/documents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ fn document_ext(doc: &DocumentRef, after: Vec<Hash>) -> ChainExt {
removes: None,
note: None,
link: None,
checkpoint: None,
}
}

Expand All @@ -124,6 +125,7 @@ fn tag_ext(op: TagOp, after: Vec<Hash>) -> ChainExt {
removes: None,
note: None,
link: None,
checkpoint: None,
}
}

Expand Down Expand Up @@ -383,6 +385,7 @@ fn test_a_document_event_that_does_not_fit_its_kind_is_not_signed() {
removes: None,
note: None,
link: None,
checkpoint: None,
};
assert!(sign(&key, 0, None, None, missing).is_err());
let with_tag = ChainExt {
Expand Down
4 changes: 4 additions & 0 deletions pkgs/id/tests/event_store_properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ fn signed(
removes: None,
note: None,
link: None,
checkpoint: None,
};
sign(key, seq, backlink, None, ext).unwrap()
}
Expand Down Expand Up @@ -339,6 +340,7 @@ fn present_event(
removes: None,
note: None,
link: None,
checkpoint: None,
};
sign(key, seq, backlink, None, ext).unwrap()
}
Expand Down Expand Up @@ -761,6 +763,7 @@ proptest! {
group: None,
after: Vec::new(), tag: None, document: None, removes: None, note: None,
link: None,
checkpoint: None,
},
)
.encode();
Expand Down Expand Up @@ -806,6 +809,7 @@ fn print_ingest_seeds() {
removes: None,
note: None,
link: None,
checkpoint: None,
};
sign(key, seq, backlink, None, ext).unwrap()
};
Expand Down
2 changes: 2 additions & 0 deletions pkgs/id/tests/production_ingest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ impl Chains {
removes: None,
note: None,
link: None,
checkpoint: None,
};
let event = sign(&key(who), seq, backlink, body.as_deref(), ext).unwrap();
self.last.insert(who, (seq, event.id));
Expand Down Expand Up @@ -296,6 +297,7 @@ fn test_a_body_that_does_not_match_its_payload_hash_is_refused() {
removes: None,
note: None,
link: None,
checkpoint: None,
},
)
.unwrap();
Expand Down
4 changes: 4 additions & 0 deletions pkgs/id/tests/retention_pruning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ impl Chains {
removes: None,
note: None,
link: None,
checkpoint: None,
};
let event = sign(&key(who), seq, backlink, body.as_deref(), ext).unwrap();
self.last.insert(who, (seq, event.id));
Expand Down Expand Up @@ -135,6 +136,7 @@ impl Chains {
removes: None,
note: Some(NoteOp::Create { content: doc }),
link: None,
checkpoint: None,
};
let event = sign(&key(who), seq, backlink, None, ext).unwrap();
self.last.insert(who, (seq, event.id));
Expand Down Expand Up @@ -171,6 +173,7 @@ impl Chains {
parents: parents.to_vec(),
}),
link: None,
checkpoint: None,
};
let event = sign(&key(who), seq, backlink, None, ext).unwrap();
self.last.insert(who, (seq, event.id));
Expand Down Expand Up @@ -205,6 +208,7 @@ impl Chains {
surface: surface.to_owned(),
pin,
}),
checkpoint: None,
};
let event = sign(&key(who), seq, backlink, None, ext).unwrap();
self.last.insert(who, (seq, event.id));
Expand Down
2 changes: 2 additions & 0 deletions pkgs/id/tests/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ impl Writer {
removes: None,
note: None,
link: None,
checkpoint: None,
})
}
}
Expand All @@ -104,6 +105,7 @@ fn tag_ext(kind: &str, op: TagOp, after: Vec<Hash>) -> ChainExt {
removes: None,
note: None,
link: None,
checkpoint: None,
}
}

Expand Down
3 changes: 3 additions & 0 deletions pkgs/id/tests/tag_claims.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ impl Writer {
removes: None,
note: None,
link: None,
checkpoint: None,
};
let event = sign(&self.key, self.seq, self.last, None, ext).unwrap();
self.seq += 1;
Expand Down Expand Up @@ -265,6 +266,7 @@ fn test_a_tag_event_whose_operation_does_not_fit_its_kind_is_not_signed() {
removes: None,
note: None,
link: None,
checkpoint: None,
};
assert!(sign(&a.key, 0, None, None, mismatch).is_err());
let missing = ChainExt {
Expand All @@ -276,6 +278,7 @@ fn test_a_tag_event_whose_operation_does_not_fit_its_kind_is_not_signed() {
removes: None,
note: None,
link: None,
checkpoint: None,
};
assert!(sign(&a.key, 0, None, None, missing).is_err());
}
Expand Down
1 change: 1 addition & 0 deletions pkgs/id/tests/voiding_properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ fn scenario(seed: u64) -> Vec<Step> {
removes: None,
note: None,
link: None,
checkpoint: None,
};
let body = action.as_ref().map(|action| encode_body(action).unwrap());
let event = sign(&key(who), seq, backlink, body.as_deref(), ext).unwrap();
Expand Down
1 change: 1 addition & 0 deletions pkgs/id/tests/voiding_scenarios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ impl Builder {
removes: None,
note: None,
link: None,
checkpoint: None,
};
let body = action.as_ref().map(|action| encode_body(action).unwrap());
let event = sign(&key(who), seq, backlink, body.as_deref(), ext).unwrap();
Expand Down
Loading