1717
1818use std:: collections:: HashMap ;
1919
20+ use carbide_redfish:: libredfish:: test_support:: { RedfishSim , RedfishSimAction } ;
21+ use carbide_redfish:: libredfish:: { RedfishAuth , RedfishClientPool } ;
22+ use carbide_secrets:: credentials:: { CredentialKey , CredentialType } ;
23+ use libredfish:: BiosProfileType ;
24+ use libredfish:: model:: service_root:: RedfishVendor ;
25+
26+ use super :: { MachineStateHandlerSiteConfig , call_machine_setup_and_handle_no_dpu_error} ;
27+
2028/// Verify that `oem_manager_profiles` from the site config is forwarded to `machine_setup`.
2129///
2230/// This test catches regressions where the argument gets dropped or replaced with an empty map.
2331#[ tokio:: test]
2432async fn test_oem_manager_profiles_passed_to_machine_setup ( ) {
25- use carbide_redfish:: libredfish:: RedfishClientPool ;
26- use carbide_redfish:: libredfish:: test_support:: { RedfishSim , RedfishSimAction } ;
27- use libredfish:: BiosProfileType ;
28- use libredfish:: model:: service_root:: RedfishVendor ;
33+ let mut config = MachineStateHandlerSiteConfig :: test_default ( ) ;
2934
30- let mut config = crate :: tests:: common:: api_fixtures:: get_config ( ) ;
3135 // Build an oem_manager_profiles map with a Dell R760 PSU Hot Spare setting.
3236 // This mirrors the fix for the Dell R760 PSU fan issue (nvbugs-5834644).
3337 config. oem_manager_profiles = HashMap :: from ( [ (
@@ -44,9 +48,6 @@ async fn test_oem_manager_profiles_passed_to_machine_setup() {
4448 ) ] ) ,
4549 ) ] ) ;
4650
47- use carbide_redfish:: libredfish:: RedfishAuth ;
48- use carbide_secrets:: credentials:: { CredentialKey , CredentialType } ;
49-
5051 let sim = RedfishSim :: default ( ) ;
5152 let timepoint = sim. timepoint ( ) ;
5253 let client = sim
@@ -61,13 +62,8 @@ async fn test_oem_manager_profiles_passed_to_machine_setup() {
6162 . await
6263 . unwrap ( ) ;
6364
64- let result = carbide_machine_controller:: handler:: call_machine_setup_and_handle_no_dpu_error (
65- client. as_ref ( ) ,
66- None ,
67- 1 ,
68- & config. machine_state_handler_site_config ( ) ,
69- )
70- . await ;
65+ let result =
66+ call_machine_setup_and_handle_no_dpu_error ( client. as_ref ( ) , None , 1 , & config) . await ;
7167
7268 assert ! ( result. is_ok( ) ) ;
7369
0 commit comments