From b9550cae39c79be48aa3eef62fc87d4c451755b0 Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Mon, 7 Aug 2023 22:15:29 +0200 Subject: [PATCH] update cli tests --- tests/integration.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index b0c4c4d..facecdb 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -26,29 +26,32 @@ fn test_flow_chris_martin() { } #[test] +// Test between organisations - Herbie to Coop fn test_flow_large() { let edges = read_edges(); - let large_source = Address::from("0x9BA1Bcd88E99d6E1E03252A70A63FEa83Bf1208c"); - let large_dest = Address::from("0x939b2731997922f21ab0a0bab500a949c0fc3550"); - test_flow(&large_source, &large_dest, &edges, U256::MAX, Some(4)); - test_flow(&large_source, &large_dest, &edges, U256::MAX, Some(6)); + let large_source = Address::from("0x3c89A829400Ea3B49F25738A1F4015A7961D0301"); + let large_dest = Address::from("0x9BA1Bcd88E99d6E1E03252A70A63FEa83Bf1208c"); + test_flow(&large_source, &large_dest, &edges, U256::MAX, None, Some(30)); + // test_flow(&large_source, &large_dest, &edges, U256::MAX, Some(10)); } fn read_edges() -> EdgeDB { - import_from_safes_binary("capacity_graph.db") + import_from_safes_binary("graph_at_20230523_15_00.db") .unwrap() .edges() .clone() } + fn test_flow( source: &Address, sink: &Address, edges: &EdgeDB, requested_flow: U256, max_distance: Option, + max_transfers: Option, ) { - let transfers = compute_flow(source, sink, edges, requested_flow, max_distance, None); + let transfers = compute_flow(source, sink, edges, requested_flow, max_distance, max_transfers); println!("{transfers:?}"); let token_owners = transfers