Skip to content

Commit

Permalink
add entrypoint test for exchange
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally committed Dec 6, 2024
1 parent fb5cffc commit 18e0061
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/analytics/enrich_account_funding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ pub fn generate_cypher_query(map: String) -> String {
ul.total_outflows = account.total_outflows,
ul.daily_funding = account.daily_funding,
ul.daily_inflows = account.daily_inflows,
ul.daily_outflows = account.daily_outflows,
ul.daily_outflows = account.daily_outflows
MERGE (sa)-[r:DailyLedger]->(ul)
SET r.date = datetime(account.date)
RETURN COUNT(r) as merged_relations
Expand Down
13 changes: 13 additions & 0 deletions tests/test_enrich_exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,16 @@ async fn e2e_swap_data() -> Result<()> {

Ok(())
}

#[tokio::test]
async fn test_entry_point_exchange_load() -> Result<()>{
let c = start_neo4j_container();
let port = c.get_host_port_ipv4(7687);
let graph = get_neo4j_localhost_pool(port).await?;
maybe_create_indexes(&graph).await?;

let path = env!("CARGO_MANIFEST_DIR");
let buf = PathBuf::from(path).join("tests/fixtures/savedOlOrders2.json");
load_exchange_orders::load_from_json(&buf, &graph, 250).await?;
Ok(())
}

0 comments on commit 18e0061

Please sign in to comment.