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

Function sqlite_delete_by_name

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

Source from the content-addressed store, hash-verified

339
340#[tokio::test]
341async fn sqlite_delete_by_name() {
342 let store = test_store().await;
343
344 store
345 .put("sandbox", "id-1", "my-sandbox", b"payload", None)
346 .await
347 .unwrap();
348
349 let deleted = store.delete_by_name("sandbox", "my-sandbox").await.unwrap();
350 assert!(deleted);
351
352 let deleted_again = store.delete_by_name("sandbox", "my-sandbox").await.unwrap();
353 assert!(!deleted_again);
354
355 let gone = store.get("sandbox", "id-1").await.unwrap();
356 assert!(gone.is_none());
357}
358
359#[tokio::test]
360async fn sqlite_name_unique_per_object_type() {

Callers

nothing calls this directly

Calls 4

test_storeFunction · 0.70
putMethod · 0.45
delete_by_nameMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected