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

Method assert_identity

atomic-cli/tests/it/record_rename_attributes_test.rs:125–141  ·  view source on GitHub ↗
(&self, repo: &Repository)

Source from the content-addressed store, hash-verified

123 }
124
125 fn assert_identity(&self, repo: &Repository) {
126 assert_eq!(repo.get_file_inode("new.txt").unwrap(), Some(self.inode));
127 assert!(repo.get_file_inode("old.txt").unwrap().is_none());
128 let txn = repo.pristine().read_txn().unwrap();
129 assert_eq!(txn.inode_position(self.inode).unwrap(), Some(self.position));
130 assert_eq!(
131 decode_trunk_id(&txn.get_crdt_inode_trunk(self.inode.get()).unwrap().unwrap()),
132 self.trunk
133 );
134 assert!(repo
135 .status(
136 repo.require_working_copy_id().unwrap(),
137 StatusOptions::default()
138 )
139 .unwrap()
140 .is_clean());
141 }
142
143 fn roundtrip(&self, expected: &[u8]) {
144 let repo = Repository::open(self.root.path()).unwrap();

Callers 3

recordMethod · 0.80
roundtripMethod · 0.80

Calls 3

read_txnMethod · 0.80
pristineMethod · 0.80
unwrapMethod · 0.45

Tested by

no test coverage detected