Helper: set up store with HTTP_CALLS edge having properties. * Creates same graph as setup_cypher_store + one HTTP_CALLS edge. */
| 2566 | /* Helper: set up store with HTTP_CALLS edge having properties. |
| 2567 | * Creates same graph as setup_cypher_store + one HTTP_CALLS edge. */ |
| 2568 | static cbm_store_t *setup_cypher_http_store(void) { |
| 2569 | cbm_store_t *s = cbm_store_open_memory(); |
| 2570 | cbm_store_upsert_project(s, "test", "/tmp/test"); |
| 2571 | |
| 2572 | cbm_node_t n1 = {.project = "test", |
| 2573 | .label = "Function", |
| 2574 | .name = "HandleOrder", |
| 2575 | .qualified_name = "test.main.HandleOrder", |
| 2576 | .file_path = "main.go", |
| 2577 | .start_line = 10, |
| 2578 | .end_line = 30}; |
| 2579 | cbm_node_t n2 = {.project = "test", |
| 2580 | .label = "Function", |
| 2581 | .name = "ValidateOrder", |
| 2582 | .qualified_name = "test.service.ValidateOrder", |
| 2583 | .file_path = "service.go", |
| 2584 | .start_line = 5, |
| 2585 | .end_line = 20}; |
| 2586 | cbm_node_t n3 = {.project = "test", |
| 2587 | .label = "Function", |
| 2588 | .name = "SubmitOrder", |
| 2589 | .qualified_name = "test.service.SubmitOrder", |
| 2590 | .file_path = "service.go", |
| 2591 | .start_line = 25, |
| 2592 | .end_line = 50}; |
| 2593 | |
| 2594 | int64_t id1 = cbm_store_upsert_node(s, &n1); |
| 2595 | cbm_store_upsert_node(s, &n2); |
| 2596 | int64_t id3 = cbm_store_upsert_node(s, &n3); |
| 2597 | |
| 2598 | cbm_edge_t http = { |
| 2599 | .project = "test", |
| 2600 | .source_id = id1, |
| 2601 | .target_id = id3, |
| 2602 | .type = "HTTP_CALLS", |
| 2603 | .properties_json = |
| 2604 | "{\"url_path\":\"/api/orders\",\"confidence\":0.85,\"method\":\"POST\"}"}; |
| 2605 | cbm_store_insert_edge(s, &http); |
| 2606 | |
| 2607 | return s; |
| 2608 | } |
| 2609 | |
| 2610 | /* Helper: set up store with TWO HTTP_CALLS edges for filtering tests. */ |
| 2611 | static cbm_store_t *setup_cypher_multi_edge_store(void) { |
no test coverage detected