@@ -586,14 +586,15 @@ impl AggregatorRunnerTrait for AggregatorRunner {
586
586
587
587
#[ cfg( test) ]
588
588
pub mod tests {
589
+ use crate :: dependency_injection:: DependenciesBuilder ;
589
590
use crate :: entities:: AggregatorEpochSettings ;
590
591
use crate :: services:: { FakeEpochService , FakeEpochServiceBuilder , MockUpkeepService } ;
591
592
use crate :: {
592
593
entities:: OpenMessage ,
593
594
initialize_dependencies,
594
595
runtime:: { AggregatorRunner , AggregatorRunnerTrait } ,
595
596
services:: { MithrilStakeDistributionService , MockCertifierService } ,
596
- DependencyContainer , MithrilSignerRegisterer , SignerRegistrationRound ,
597
+ Configuration , DependencyContainer , MithrilSignerRegisterer , SignerRegistrationRound ,
597
598
} ;
598
599
use async_trait:: async_trait;
599
600
use chrono:: { DateTime , Utc } ;
@@ -1029,16 +1030,13 @@ pub mod tests {
1029
1030
. returning ( |_| Ok ( ( ) ) )
1030
1031
. times ( 1 ) ;
1031
1032
1032
- let mut deps = initialize_dependencies ( ) . await ;
1033
+ let config = Configuration :: new_sample ( ) ;
1034
+ let mut deps = DependenciesBuilder :: new_with_stdout_logger ( config. clone ( ) )
1035
+ . build_dependency_container ( )
1036
+ . await
1037
+ . unwrap ( ) ;
1033
1038
deps. certifier_service = Arc :: new ( mock_certifier_service) ;
1034
1039
let epoch_settings_storer = deps. epoch_settings_storer . clone ( ) ;
1035
- let expected_epoch_settings = AggregatorEpochSettings {
1036
- protocol_parameters : deps. config . protocol_parameters . clone ( ) ,
1037
- cardano_transactions_signing_config : deps
1038
- . config
1039
- . cardano_transactions_signing_config
1040
- . clone ( ) ,
1041
- } ;
1042
1040
let current_epoch = deps. ticker_service . get_current_epoch ( ) . await . unwrap ( ) ;
1043
1041
let insert_epoch = current_epoch. offset_to_epoch_settings_recording_epoch ( ) ;
1044
1042
@@ -1055,7 +1053,15 @@ pub mod tests {
1055
1053
. unwrap ( )
1056
1054
. unwrap_or_else ( || panic ! ( "should have epoch settings for epoch {insert_epoch}" , ) ) ;
1057
1055
1058
- assert_eq ! ( expected_epoch_settings, saved_epoch_settings) ;
1056
+ assert_eq ! (
1057
+ AggregatorEpochSettings {
1058
+ protocol_parameters: config. protocol_parameters. clone( ) ,
1059
+ cardano_transactions_signing_config: config
1060
+ . cardano_transactions_signing_config
1061
+ . clone( ) ,
1062
+ } ,
1063
+ saved_epoch_settings
1064
+ ) ;
1059
1065
}
1060
1066
1061
1067
#[ tokio:: test]
0 commit comments