Helper: set up store with HTTP_CALLS edge having properties. * Creates same graph as setup_cypher_store + one HTTP_CALLS edge. */
| 2082 | /* Helper: set up store with HTTP_CALLS edge having properties. |
| 2083 | * Creates same graph as setup_cypher_store + one HTTP_CALLS edge. */ |
| 2084 | static cbm_store_t *setup_cypher_http_store(void) { |
| 2085 | cbm_store_t *s = cbm_store_open_memory(); |
| 2086 | cbm_store_upsert_project(s, "test", "/tmp/test"); |
| 2087 | |
| 2088 | cbm_node_t n1 = {.project = "test", |
| 2089 | .label = "Function", |
| 2090 | .name = "HandleOrder", |
| 2091 | .qualified_name = "test.main.HandleOrder", |
| 2092 | .file_path = "main.go", |
| 2093 | .start_line = 10, |
| 2094 | .end_line = 30}; |
| 2095 | cbm_node_t n2 = {.project = "test", |
| 2096 | .label = "Function", |
| 2097 | .name = "ValidateOrder", |
| 2098 | .qualified_name = "test.service.ValidateOrder", |
| 2099 | .file_path = "service.go", |
| 2100 | .start_line = 5, |
| 2101 | .end_line = 20}; |
| 2102 | cbm_node_t n3 = {.project = "test", |
| 2103 | .label = "Function", |
| 2104 | .name = "SubmitOrder", |
| 2105 | .qualified_name = "test.service.SubmitOrder", |
| 2106 | .file_path = "service.go", |
| 2107 | .start_line = 25, |
| 2108 | .end_line = 50}; |
| 2109 | |
| 2110 | int64_t id1 = cbm_store_upsert_node(s, &n1); |
| 2111 | cbm_store_upsert_node(s, &n2); |
| 2112 | int64_t id3 = cbm_store_upsert_node(s, &n3); |
| 2113 | |
| 2114 | cbm_edge_t http = { |
| 2115 | .project = "test", |
| 2116 | .source_id = id1, |
| 2117 | .target_id = id3, |
| 2118 | .type = "HTTP_CALLS", |
| 2119 | .properties_json = |
| 2120 | "{\"url_path\":\"/api/orders\",\"confidence\":0.85,\"method\":\"POST\"}"}; |
| 2121 | cbm_store_insert_edge(s, &http); |
| 2122 | |
| 2123 | return s; |
| 2124 | } |
| 2125 | |
| 2126 | /* Helper: set up store with TWO HTTP_CALLS edges for filtering tests. */ |
| 2127 | static cbm_store_t *setup_cypher_multi_edge_store(void) { |
no test coverage detected