Skip to content

Commit 94cd7cf

Browse files
committed
wip: CI
1 parent 8506954 commit 94cd7cf

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

crates/solver-core/src/handlers/intent.rs

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,9 @@ mod tests {
490490
Address(vec![0xab; 20])
491491
}
492492

493-
fn create_test_config() -> Arc<RwLock<Config>> {
494-
Arc::new(RwLock::new(ConfigBuilder::new().build()))
493+
fn create_test_config() -> (Arc<RwLock<Config>>, Config) {
494+
let config = ConfigBuilder::new().build();
495+
(Arc::new(RwLock::new(config.clone())), config)
495496
}
496497

497498
fn create_mock_cost_profit_service() -> Arc<CostProfitService> {
@@ -707,7 +708,7 @@ mod tests {
707708
))),
708709
));
709710
let cost_profit_service = create_mock_cost_profit_service();
710-
let config = create_test_config();
711+
let (config, static_config) = create_test_config();
711712

712713
let handler = IntentHandler::new(
713714
order_service,
@@ -719,6 +720,7 @@ mod tests {
719720
token_manager,
720721
cost_profit_service,
721722
config,
723+
&static_config,
722724
);
723725

724726
let result = handler.handle(intent).await;
@@ -758,7 +760,7 @@ mod tests {
758760
))),
759761
));
760762
let cost_profit_service = create_mock_cost_profit_service();
761-
let config = create_test_config();
763+
let (config, static_config) = create_test_config();
762764

763765
let handler = IntentHandler::new(
764766
order_service,
@@ -770,6 +772,7 @@ mod tests {
770772
token_manager,
771773
cost_profit_service,
772774
config,
775+
&static_config,
773776
);
774777

775778
let result = handler.handle(intent).await;
@@ -826,7 +829,7 @@ mod tests {
826829
MockAccountInterface::new(),
827830
))),
828831
));
829-
let config = create_test_config();
832+
let (config, static_config) = create_test_config();
830833

831834
let cost_profit_service = create_mock_cost_profit_service();
832835

@@ -840,6 +843,7 @@ mod tests {
840843
token_manager,
841844
cost_profit_service,
842845
config,
846+
&static_config,
843847
);
844848

845849
let result = handler.handle(intent).await;
@@ -917,7 +921,7 @@ mod tests {
917921
MockAccountInterface::new(),
918922
))),
919923
));
920-
let config = create_test_config();
924+
let (config, static_config) = create_test_config();
921925

922926
let cost_profit_service = create_mock_cost_profit_service();
923927

@@ -931,6 +935,7 @@ mod tests {
931935
token_manager,
932936
cost_profit_service,
933937
config,
938+
&static_config,
934939
);
935940

936941
let result = handler.handle(intent).await;
@@ -1008,7 +1013,7 @@ mod tests {
10081013
MockAccountInterface::new(),
10091014
))),
10101015
));
1011-
let config = create_test_config();
1016+
let (config, static_config) = create_test_config();
10121017

10131018
let cost_profit_service = create_mock_cost_profit_service();
10141019

@@ -1022,6 +1027,7 @@ mod tests {
10221027
token_manager,
10231028
cost_profit_service,
10241029
config,
1030+
&static_config,
10251031
);
10261032

10271033
let result = handler.handle(intent).await;
@@ -1059,7 +1065,7 @@ mod tests {
10591065
MockAccountInterface::new(),
10601066
))),
10611067
));
1062-
let config = create_test_config();
1068+
let (config, static_config) = create_test_config();
10631069

10641070
let cost_profit_service = create_mock_cost_profit_service();
10651071

@@ -1073,6 +1079,7 @@ mod tests {
10731079
token_manager,
10741080
cost_profit_service,
10751081
config,
1082+
&static_config,
10761083
);
10771084

10781085
let result = handler.handle(intent).await;
@@ -1148,7 +1155,7 @@ mod tests {
11481155
MockAccountInterface::new(),
11491156
))),
11501157
));
1151-
let config = create_test_config();
1158+
let (config, static_config) = create_test_config();
11521159

11531160
// Subscribe to events before creating handler
11541161
let mut receiver = event_bus.subscribe();
@@ -1165,6 +1172,7 @@ mod tests {
11651172
token_manager,
11661173
cost_profit_service,
11671174
config,
1175+
&static_config,
11681176
);
11691177

11701178
// Handle intent and check events

0 commit comments

Comments
 (0)