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

Function test_catalog_persistence

graphlite/tests/cli_fixture_tests.rs:24–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22
23#[test]
24fn test_catalog_persistence() {
25 let fixture = CliFixture::empty().expect("Failed to create CLI fixture");
26 let schema_name = fixture.schema_name();
27
28 // Create schema in command 1
29 fixture.assert_query_succeeds(&format!("CREATE SCHEMA /{};", schema_name));
30
31 // Create graph in command 2 - this will FAIL if schema didn't persist
32 let result = fixture.assert_query_succeeds(&format!("CREATE GRAPH /{}/test;", schema_name));
33 assert!(!result.is_empty());
34
35 // Verify we can reference the graph in command 3
36 let result2 =
37 fixture.assert_query_succeeds(&format!("SESSION SET GRAPH /{}/test;", schema_name));
38 // SESSION SET GRAPH returns empty result on success
39 assert!(result2.is_empty() || result2.is_empty() || result2.rows.is_empty());
40}

Callers

nothing calls this directly

Calls 2

schema_nameMethod · 0.45
assert_query_succeedsMethod · 0.45

Tested by

no test coverage detected