MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / test_error_handling

Function test_error_handling

graphlite/tests/fixture_tests.rs:432–451  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

430
431#[test]
432fn test_error_handling() {
433 let fixture = TestFixture::new().expect("Failed to create test fixture");
434 // Setup fresh graph for this test to avoid interference
435 fixture
436 .setup_graph("test_error_handling")
437 .expect("Failed to setup graph");
438 // Re-insert simple data since we have a fresh graph
439 fixture
440 .insert_simple_data()
441 .expect("Failed to insert simple data");
442
443 // Test syntax errors
444 fixture.assert_query_fails("MATCH (n:TestNode WHERE n.value > 10", "Parse error");
445
446 // Test invalid syntax (missing RETURN)
447 fixture.assert_query_fails("MATCH (n:TestNode) WHERE n.value > 10", "Parse error");
448
449 // Test type errors
450 fixture.assert_query_fails("MATCH (n:TestNode) WHERE n.name > 100 RETURN n", "");
451}
452
453#[test]
454fn test_transaction_consistency() {

Callers

nothing calls this directly

Calls 3

setup_graphMethod · 0.80
insert_simple_dataMethod · 0.80
assert_query_failsMethod · 0.45

Tested by

no test coverage detected