MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / sqlite_get_by_name

Function sqlite_get_by_name

crates/openshell-server/src/persistence/tests.rs:291–310  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

289
290#[tokio::test]
291async fn sqlite_get_by_name() {
292 let store = test_store().await;
293
294 store
295 .put("sandbox", "id-1", "my-sandbox", b"payload", None)
296 .await
297 .unwrap();
298
299 let record = store
300 .get_by_name("sandbox", "my-sandbox")
301 .await
302 .unwrap()
303 .unwrap();
304 assert_eq!(record.id, "id-1");
305 assert_eq!(record.name, "my-sandbox");
306 assert_eq!(record.payload, b"payload");
307
308 let missing = store.get_by_name("sandbox", "no-such-name").await.unwrap();
309 assert!(missing.is_none());
310}
311
312#[tokio::test]
313async fn sqlite_get_message_by_name() {

Callers

nothing calls this directly

Calls 3

test_storeFunction · 0.70
putMethod · 0.45
get_by_nameMethod · 0.45

Tested by

no test coverage detected