MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_inmemorydrive_put_respects_acls

Function test_inmemorydrive_put_respects_acls

std/src/storage/mem.rs:131–145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

129
130 #[tokio::test]
131 async fn test_inmemorydrive_put_respects_acls() {
132 let mut drive = InMemoryDrive::default();
133 drive.put("untouched", b"some content").await.unwrap();
134
135 drive.put("file", b"before").await.unwrap();
136 drive.update_acls("file", &readers(&["r1"]), &FileAcls::default()).await.unwrap();
137
138 assert_eq!(b"before", drive.get("file").await.unwrap().as_slice());
139 assert_eq!(readers(&["r1"]), drive.get_acls("file").await.unwrap());
140
141 drive.put("file", b"after").await.unwrap();
142
143 assert_eq!(b"after", drive.get("file").await.unwrap().as_slice());
144 assert_eq!(readers(&["r1"]), drive.get_acls("file").await.unwrap());
145 }
146
147 #[tokio::test]
148 async fn test_inmemorydrive_get_update_acls() {

Callers

nothing calls this directly

Calls 3

readersFunction · 0.85
putMethod · 0.45
update_aclsMethod · 0.45

Tested by

no test coverage detected