MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / copy_to_missing_collection

Function copy_to_missing_collection

nodedb/tests/sql_copy_to.rs:195–211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193
194#[tokio::test]
195async fn copy_to_missing_collection() {
196 let srv = TestServer::start().await;
197
198 let (_dir, out_path) = temp_output_path(".ndjson");
199 let result = srv
200 .exec(&format!("COPY no_such_collection_xyz TO '{out_path}'"))
201 .await;
202 assert!(
203 result.is_err(),
204 "expected error for non-existent collection"
205 );
206 let msg = result.unwrap_err();
207 assert!(
208 msg.contains("does not exist") || msg.contains("not found") || msg.contains("no_such"),
209 "expected missing-collection error, got: {msg}"
210 );
211}
212
213// ── test 8: round-trip COPY TO + COPY FROM ───────────────────────────────────
214

Callers

nothing calls this directly

Calls 2

temp_output_pathFunction · 0.85
execMethod · 0.45

Tested by

no test coverage detected