@@ -661,11 +661,7 @@ mod tests {
661661 if let Ok ( mut ctx) = context_info_result {
662662 // Temporarily override config to point to a non-existent path
663663 let original_path =
664- std:: env:: var ( "KEYLIME_CONFIG_PATH" ) . unwrap_or_default ( ) ;
665- std:: env:: set_var (
666- "KEYLIME_CONFIG_PATH" ,
667- "test-data/non-existent-config.conf" ,
668- ) ;
664+ std:: env:: var ( "KEYLIME_AGENT_CONFIG" ) . unwrap_or_default ( ) ;
669665
670666 // Create a temporary config file with an invalid path for measuredboot_ml_path
671667 let temp_dir = tempfile:: tempdir ( ) . unwrap ( ) ;
@@ -675,16 +671,20 @@ mod tests {
675671 writeln ! ( file, "[agent]" ) . unwrap ( ) ;
676672 writeln ! (
677673 file,
678- "measuredboot_ml_path = /path/to/non/existent/log"
674+ "measuredboot_ml_path = \" /path/to/non/existent/log\" "
679675 )
680676 . unwrap ( ) ;
681- std:: env:: set_var ( "KEYLIME_CONFIG_PATH " , config_path) ;
677+ std:: env:: set_var ( "KEYLIME_AGENT_CONFIG " , config_path) ;
682678
683679 let filler = FillerFromHardware :: new ( & mut ctx) ;
684680 assert ! ( filler. uefi_log_handler. is_none( ) ) ;
685681
686682 // Restore original config path
687- std:: env:: set_var ( "KEYLIME_CONFIG_PATH" , original_path) ;
683+ if original_path. is_empty ( ) {
684+ std:: env:: remove_var ( "KEYLIME_AGENT_CONFIG" ) ;
685+ } else {
686+ std:: env:: set_var ( "KEYLIME_AGENT_CONFIG" , original_path) ;
687+ }
688688 assert ! ( ctx. flush_context( ) . is_ok( ) ) ;
689689 }
690690 }
0 commit comments