()
| 749 | |
| 750 | #[test] |
| 751 | fn test_query_plan_json_roundtrip() { |
| 752 | let plan = QueryPlan { |
| 753 | steps: vec![ |
| 754 | QueryStep::KgSearch { |
| 755 | query: "auth".to_string(), |
| 756 | limit: 5, |
| 757 | bind: Some("results".to_string()), |
| 758 | }, |
| 759 | QueryStep::Filter { |
| 760 | input: "results".to_string(), |
| 761 | field: "kind".to_string(), |
| 762 | equals: Some("intent".to_string()), |
| 763 | not_equals: None, |
| 764 | bind: Some("intents".to_string()), |
| 765 | }, |
| 766 | QueryStep::KgNeighbors { |
| 767 | node_id: "$intents".to_string(), |
| 768 | depth: 2, |
| 769 | bind: None, |
| 770 | }, |
| 771 | ], |
| 772 | }; |
| 773 | let json = serde_json::to_string_pretty(&plan).unwrap(); |
| 774 | let parsed = parse_plan(&json).unwrap(); |
| 775 | assert_eq!(parsed.steps.len(), 3); |
| 776 | } |
| 777 | |
| 778 | #[test] |
| 779 | fn test_execute_plan_simple() { |
nothing calls this directly
no test coverage detected