@@ -332,6 +332,41 @@ fn executor_spawn_failure_is_persisted_as_a_typed_finding() {
332332 assert ! ( state_path. is_file( ) ) ;
333333}
334334
335+ #[ test]
336+ fn missing_easybuild_program_is_persisted_as_a_runtime_finding ( ) {
337+ let temp = tempfile:: tempdir ( ) . expect ( "tempdir" ) ;
338+ let bundle = temp. path ( ) . join ( "bundle" ) ;
339+ let recipes = bundle. join ( "easyconfigs/e/eOn" ) ;
340+ std:: fs:: create_dir_all ( & recipes) . expect ( "recipes" ) ;
341+ std:: fs:: create_dir_all ( bundle. join ( "locks" ) ) . expect ( "locks" ) ;
342+ std:: fs:: write (
343+ bundle. join ( "package.plan.json" ) ,
344+ r#"{"package":{"name":"eOn","version":"2.16.0"}}"# ,
345+ )
346+ . expect ( "manifest" ) ;
347+ std:: fs:: write (
348+ bundle. join ( "locks/default.lock.json" ) ,
349+ r#"{"profile":"default","solver":"resolvo"}"# ,
350+ )
351+ . expect ( "lock" ) ;
352+ std:: fs:: write ( recipes. join ( "eOn.eb" ) , "name = 'eOn'\n " ) . expect ( "recipe" ) ;
353+ let state_path = temp. path ( ) . join ( "campaign.json" ) ;
354+
355+ let state = run_campaign ( & CampaignRequest {
356+ bundle,
357+ target : target ( "/definitely/missing/eb-stack-easybuild" ) ,
358+ state_path : state_path. clone ( ) ,
359+ } )
360+ . expect ( "missing workload command is campaign evidence" ) ;
361+ assert_eq ! ( state. status, CampaignStatus :: Failed ) ;
362+ assert_eq ! ( state. findings. len( ) , 1 ) ;
363+ assert_eq ! ( state. findings[ 0 ] . class, BuildFindingClass :: Runtime ) ;
364+ assert_eq ! ( state. findings[ 0 ] . stage, "build" ) ;
365+ assert_eq ! ( state. findings[ 0 ] . exit_code, Some ( 127 ) ) ;
366+ assert ! ( state. findings[ 0 ] . evidence. contains( "eb-stack-easybuild" ) ) ;
367+ assert ! ( state_path. is_file( ) ) ;
368+ }
369+
335370#[ test]
336371fn campaign_runs_profile_verification_and_sets_the_binary_claim ( ) {
337372 let temp = tempfile:: tempdir ( ) . expect ( "tempdir" ) ;
0 commit comments