@@ -201,6 +201,34 @@ def test_validate_no_var_in_app_path_passes(self):
201201 result = target .validate_no_var_in_app_path (process , "file.recipe" )
202202 self .assertTrue (result )
203203
204+ def test_validate_proc_type_conventions_unknown_type_passes (self ):
205+ # Unknown recipe type should skip validation and pass with warning
206+ process = [{"Processor" : "MunkiImporter" }]
207+ with mock .patch ("builtins.print" ) as mock_print :
208+ result = target .validate_proc_type_conventions (process , "App.custom.recipe" )
209+ self .assertTrue (result )
210+ mock_print .assert_called_with (
211+ "App.custom.recipe: WARNING: Unknown recipe type. Skipping processor convention checks."
212+ )
213+
214+ def test_validate_proc_type_conventions_known_type_wrong_processor_fails (self ):
215+ # Munki processor in a download recipe should fail
216+ process = [{"Processor" : "MunkiImporter" }]
217+ with mock .patch ("builtins.print" ) as mock_print :
218+ result = target .validate_proc_type_conventions (
219+ process , "App.download.recipe"
220+ )
221+ self .assertFalse (result )
222+ mock_print .assert_called_with (
223+ "App.download.recipe: Processor MunkiImporter is not conventional for this recipe type."
224+ )
225+
226+ def test_validate_proc_type_conventions_known_type_correct_processor_passes (self ):
227+ # Munki processor in a munki recipe should pass
228+ process = [{"Processor" : "MunkiImporter" }]
229+ result = target .validate_proc_type_conventions (process , "App.munki.recipe" )
230+ self .assertTrue (result )
231+
204232
205233if __name__ == "__main__" :
206234 unittest .main ()
0 commit comments