MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / seed_project_identity

Function seed_project_identity

atomic-core/src/pristine/txn/write/tests.rs:11–25  ·  view source on GitHub ↗
(txn: &mut WriteTxn<'_>)

Source from the content-addressed store, hash-verified

9 use tempfile::tempdir;
10
11 fn seed_project_identity(txn: &mut WriteTxn<'_>) {
12 use crate::kg::project_id::{MintReason, ProjectId, ProjectIdentityRecord};
13 let object = serde_json::to_vec(
14 &serde_json::json!({"atomic:projectId": ProjectId::generate().to_base32()}),
15 )
16 .unwrap();
17 txn.put_project_identity_if_absent(&ProjectIdentityRecord {
18 hash: Hash::of(&object),
19 object,
20 mint_reason: MintReason::Upgrade,
21 created_at: "2026-10-15T00:00:00Z".into(),
22 previous: None,
23 })
24 .unwrap();
25 }
26
27 #[test]
28 fn test_register_change() {

Calls 2

unwrapMethod · 0.45

Tested by

no test coverage detected