Helper: set up store with HTTP_CALLS edge having properties. * Creates same graph as setup_cypher_store + one HTTP_CALLS edge. */
| 1972 | /* Helper: set up store with HTTP_CALLS edge having properties. |
| 1973 | * Creates same graph as setup_cypher_store + one HTTP_CALLS edge. */ |
| 1974 | static cbm_store_t *setup_cypher_http_store(void) { |
| 1975 | cbm_store_t *s = cbm_store_open_memory(); |
| 1976 | cbm_store_upsert_project(s, "test", "/tmp/test"); |
| 1977 | |
| 1978 | cbm_node_t n1 = {.project = "test", |
| 1979 | .label = "Function", |
| 1980 | .name = "HandleOrder", |
| 1981 | .qualified_name = "test.main.HandleOrder", |
| 1982 | .file_path = "main.go", |
| 1983 | .start_line = 10, |
| 1984 | .end_line = 30}; |
| 1985 | cbm_node_t n2 = {.project = "test", |
| 1986 | .label = "Function", |
| 1987 | .name = "ValidateOrder", |
| 1988 | .qualified_name = "test.service.ValidateOrder", |
| 1989 | .file_path = "service.go", |
| 1990 | .start_line = 5, |
| 1991 | .end_line = 20}; |
| 1992 | cbm_node_t n3 = {.project = "test", |
| 1993 | .label = "Function", |
| 1994 | .name = "SubmitOrder", |
| 1995 | .qualified_name = "test.service.SubmitOrder", |
| 1996 | .file_path = "service.go", |
| 1997 | .start_line = 25, |
| 1998 | .end_line = 50}; |
| 1999 | |
| 2000 | int64_t id1 = cbm_store_upsert_node(s, &n1); |
| 2001 | cbm_store_upsert_node(s, &n2); |
| 2002 | int64_t id3 = cbm_store_upsert_node(s, &n3); |
| 2003 | |
| 2004 | cbm_edge_t http = { |
| 2005 | .project = "test", |
| 2006 | .source_id = id1, |
| 2007 | .target_id = id3, |
| 2008 | .type = "HTTP_CALLS", |
| 2009 | .properties_json = |
| 2010 | "{\"url_path\":\"/api/orders\",\"confidence\":0.85,\"method\":\"POST\"}"}; |
| 2011 | cbm_store_insert_edge(s, &http); |
| 2012 | |
| 2013 | return s; |
| 2014 | } |
| 2015 | |
| 2016 | /* Helper: set up store with TWO HTTP_CALLS edges for filtering tests. */ |
| 2017 | static cbm_store_t *setup_cypher_multi_edge_store(void) { |
no test coverage detected