MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_parse_simple_plan

Function test_parse_simple_plan

atomic-repository/src/query_plan.rs:551–568  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

549
550 #[test]
551 fn test_parse_simple_plan() {
552 let json = r#"{
553 "schema_version": 1,
554 "steps": [
555 {"type": "kg_search", "query": "authentication", "limit": 5, "bind": "auth_nodes"}
556 ]
557 }"#;
558 let plan = parse_plan(json).unwrap();
559 assert_eq!(plan.steps.len(), 1);
560 match &plan.steps[0] {
561 QueryStep::KgSearch { query, limit, bind } => {
562 assert_eq!(query, "authentication");
563 assert_eq!(*limit, 5);
564 assert_eq!(bind.as_deref(), Some("auth_nodes"));
565 }
566 _ => panic!("Expected KgSearch step"),
567 }
568 }
569
570 #[test]
571 fn test_parse_multi_step_plan() {

Callers

nothing calls this directly

Calls 2

parse_planFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected