@@ -135,12 +135,7 @@ fn applies_to_action(
135135 configs : & tucana:: shared:: ModuleConfigurations ,
136136 action_identifier : & str ,
137137) -> bool {
138- configs. module_configurations . iter ( ) . any ( |project_cfg| {
139- project_cfg
140- . module_configurations
141- . iter ( )
142- . any ( |cfg| cfg. identifier == action_identifier)
143- } )
138+ configs. module_identifier == action_identifier
144139}
145140
146141fn overwrite_module_definition_sources (
@@ -611,10 +606,9 @@ impl ActionTransferService for AquilaActionTransferServiceServer {
611606 }
612607 tucana:: aquila:: action_transfer_request:: Data :: Result ( execution_result) => {
613608 log:: debug!(
614- "Received execution result execution_id={} action={}, result={:#?} " ,
609+ "Received execution result execution_id={} action={}" ,
615610 execution_result. execution_identifier,
616- identifier,
617- execution_result
611+ identifier
618612 ) ;
619613
620614 handle_result ( execution_result, client. clone ( ) , pending_replies. clone ( ) )
@@ -723,6 +717,23 @@ async fn forward_nats_to_action(
723717mod tests {
724718 use super :: * ;
725719
720+ #[ test]
721+ fn module_configurations_apply_by_module_identifier ( ) {
722+ let configs = tucana:: shared:: ModuleConfigurations {
723+ module_identifier : "gls-action" . to_string ( ) ,
724+ module_configurations : vec ! [ tucana:: shared:: ModuleProjectConfigurations {
725+ project_id: 1 ,
726+ module_configurations: vec![ tucana:: shared:: ModuleConfiguration {
727+ identifier: "username" . to_string( ) ,
728+ value: None ,
729+ } ] ,
730+ } ] ,
731+ } ;
732+
733+ assert ! ( applies_to_action( & configs, "gls-action" ) ) ;
734+ assert ! ( !applies_to_action( & configs, "another-action" ) ) ;
735+ }
736+
726737 #[ test]
727738 fn overwrite_module_definition_sources_uses_action_source ( ) {
728739 let mut module = tucana:: shared:: Module {
0 commit comments