Skip to content

Commit 02a5adf

Browse files
committed
test(integration): remove xfail from Graph RPC tests (all passing)
GraphService now persists nodes and edges via Cypher. Remove xfail markers and stale comments about stub behaviour.
1 parent 2bfca71 commit 02a5adf

1 file changed

Lines changed: 5 additions & 17 deletions

File tree

tests/integration/test_sdk.py

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -85,45 +85,33 @@ def test_cypher_no_rows(client):
8585
assert rows == []
8686

8787

88-
# ── Graph RPC API (stubs — data not yet persisted, node_id always 0) ──────────
89-
# GraphService (CreateNode / GetNode / CreateEdge) returns the request echoed
90-
# back with node_id=0. The nodes are NOT stored; MATCH via Cypher returns empty.
91-
# These tests document the current alpha behaviour so regressions are visible.
88+
# ── Graph RPC API ─────────────────────────────────────────────────────────────
9289

93-
_GRAPH_RPC_REASON = (
94-
"GraphService stubs echo request data but do not persist nodes (id always 0). "
95-
"CypherService is the production path for node/edge creation in alpha."
96-
)
9790

98-
99-
@pytest.mark.xfail(reason=_GRAPH_RPC_REASON, strict=True)
10091
def test_create_node_rpc_returns_id(client):
101-
"""CreateNode RPC must return a non-zero node_id once implemented."""
92+
"""CreateNode RPC returns a non-zero node_id."""
10293
node = client.create_node(labels=["Person"], properties={"name": f"rpc-{uid()}"})
10394
assert node.id > 0
10495

10596

106-
@pytest.mark.xfail(reason=_GRAPH_RPC_REASON, strict=True)
10797
def test_create_node_rpc_persists(client):
108-
"""Node created via RPC must be retrievable via Cypher."""
98+
"""Node created via RPC is retrievable via Cypher."""
10999
name = f"persist-{uid()}"
110100
client.create_node(labels=["Person"], properties={"name": name})
111101
rows = client.cypher("MATCH (n:Person {name: $name}) RETURN n.name AS name", params={"name": name})
112102
assert len(rows) == 1, f"node not found via Cypher: {rows}"
113103
client.cypher("MATCH (n:Person {name: $name}) DELETE n", params={"name": name})
114104

115105

116-
@pytest.mark.xfail(reason=_GRAPH_RPC_REASON, strict=True)
117106
def test_get_node_rpc(client):
118-
"""GetNode must return the stored node once CreateNode persists."""
107+
"""GetNode returns the stored node with matching id."""
119108
node = client.create_node(labels=["Person"], properties={"name": f"get-{uid()}"})
120109
fetched = client.get_node(node.id)
121110
assert fetched.id == node.id
122111

123112

124-
@pytest.mark.xfail(reason=_GRAPH_RPC_REASON, strict=True)
125113
def test_create_edge_rpc(client):
126-
"""CreateEdge must create a traversable relationship once node IDs are valid."""
114+
"""CreateEdge connects two nodes; edge_id > 0 and endpoints match."""
127115
a = client.create_node(labels=["EdgeTest"], properties={"name": f"a-{uid()}"})
128116
b = client.create_node(labels=["EdgeTest"], properties={"name": f"b-{uid()}"})
129117
edge = client.create_edge("KNOWS", a.id, b.id, properties={"since": 2020})

0 commit comments

Comments
 (0)