The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(tests): use struct update syntax for config and profile construction
Steven Enamakel8df43a37593f
diff --git a/crates/openhuman-rpc/src/server/auth_tests.rs b/crates/openhuman-rpc/src/server/auth_tests.rsindex 48950a5e29..47a1f886d0 100644--- a/crates/openhuman-rpc/src/server/auth_tests.rs+++ b/crates/openhuman-rpc/src/server/auth_tests.rs@@ -72,8 +72,10 @@ fn is_external_inference_path_matches_only_v1_routes() {#[test]fn verify_external_inference_bearer_for_config_accepts_stored_key() {let tmp = tempfile::tempdir().unwrap();- let mut config = Config::default();- config.config_path = tmp.path().join("config.toml");+ let config = Config {+ config_path: tmp.path().join("config.toml"),+ ..Default::default()+ };let auth = AuthService::from_config(&config);auth.store_provider_token(diff --git a/tests/composio_list_tools_stack_overflow_regression.rs b/tests/composio_list_tools_stack_overflow_regression.rsindex 8e0e88580b..6b2115b7b6 100644--- a/tests/composio_list_tools_stack_overflow_regression.rs+++ b/tests/composio_list_tools_stack_overflow_regression.rs@@ -345,8 +345,10 @@ fn composio_list_tools_via_subagent_runs_on_small_worker_stack() {async fn drive_subagent() {let _ = AgentDefinitionRegistry::init_global_builtins();- let mut profile = ModelProfile::default();- profile.tool_calling = true;+ let profile = ModelProfile {+ tool_calling: true,+ ..Default::default()+ };let model = Arc::new(StubModel {iter: Arc::new(Mutex::new(0)),profile,diff --git a/tests/in_process/calendar_grounding_e2e.rs b/tests/in_process/calendar_grounding_e2e.rsindex 0dc76b490d..9c311f411c 100644--- a/tests/in_process/calendar_grounding_e2e.rs+++ b/tests/in_process/calendar_grounding_e2e.rs@@ -70,8 +70,10 @@ impl ChatModel<()> for MockCalendarModel {}fn calendar_model(captured_messages: Arc<Mutex<Vec<Message>>>) -> Arc<MockCalendarModel> {- let mut profile = ModelProfile::default();- profile.tool_calling = true;+ let profile = ModelProfile {+ tool_calling: true,+ ..Default::default()+ };Arc::new(MockCalendarModel {captured_messages,iter_count: Arc::new(Mutex::new(0)),diff --git a/tests/in_process/config_auth_app_state_connectivity_e2e.rs b/tests/in_process/config_auth_app_state_connectivity_e2e.rsindex 3dda3b26f1..d044502ab6 100644--- a/tests/in_process/config_auth_app_state_connectivity_e2e.rs+++ b/tests/in_process/config_auth_app_state_connectivity_e2e.rs@@ -476,9 +476,11 @@ fn config_schema_defaults_cover_dashboard_capability_memory_and_security_shapes(assert!(local_ai.use_local_for_subconscious());}- let mut search = openhuman_core::config::schema::SearchConfig::default();- search.brave = openhuman_core::config::schema::SearchEngineCredentials {- api_key: Some(" brave-key ".into()),+ let search = openhuman_core::config::schema::SearchConfig {+ brave: openhuman_core::config::schema::SearchEngineCredentials {+ api_key: Some(" brave-key ".into()),+ },+ ..Default::default()};assert_eq!(search.brave.key(),@@ -1375,9 +1377,11 @@ async fn config_save_and_load_encrypts_channel_secret_fields() {.expect("config parent").join("workspace");- let mut config = Config::default();- config.config_path = config_path.clone();- config.workspace_dir = workspace_dir.clone();+ let mut config = Config {+ config_path: config_path.clone(),+ workspace_dir: workspace_dir.clone(),+ ..Default::default()+ };config.secrets.encrypt = true;config.api_key = Some("api-secret".into());config.search.brave.api_key = Some("brave-secret".into());@@ -1618,9 +1622,11 @@ fn auth_service_direct_paths_cover_profile_selection_and_validation() {async fn auth_provider_prefix_listing_sorts_filters_and_excludes_app_session() {let _lock = env_lock();let tmp = tempdir().expect("tempdir");- let mut config = Config::default();- config.config_path = tmp.path().join("config.toml");- config.workspace_dir = tmp.path().join("workspace");+ let mut config = Config {+ config_path: tmp.path().join("config.toml"),+ workspace_dir: tmp.path().join("workspace"),+ ..Default::default()+ };config.secrets.encrypt = false;std::fs::create_dir_all(config.config_path.parent().expect("config parent")).expect("create config parent");@@ -1687,9 +1693,11 @@ async fn auth_provider_prefix_listing_sorts_filters_and_excludes_app_session() {async fn composio_direct_credentials_helpers_trim_store_and_clear_key() {let _lock = env_lock();let tmp = tempdir().expect("tempdir");- let mut config = Config::default();- config.config_path = tmp.path().join("config.toml");- config.workspace_dir = tmp.path().join("workspace");+ let mut config = Config {+ config_path: tmp.path().join("config.toml"),+ workspace_dir: tmp.path().join("workspace"),+ ..Default::default()+ };config.secrets.encrypt = false;std::fs::create_dir_all(config.config_path.parent().expect("config parent")).expect("create config parent");@@ -1751,9 +1759,11 @@ async fn composio_direct_credentials_helpers_trim_store_and_clear_key() {async fn credentials_public_ops_cover_service_and_missing_session_error_paths() {let _lock = env_lock();let tmp = tempdir().expect("tempdir");- let mut config = Config::default();- config.config_path = tmp.path().join("config.toml");- config.workspace_dir = tmp.path().join("workspace");+ let mut config = Config {+ config_path: tmp.path().join("config.toml"),+ workspace_dir: tmp.path().join("workspace"),+ ..Default::default()+ };config.secrets.encrypt = false;config.local_ai.runtime_enabled = false;config.voice_server.auto_start = false;@@ -1824,9 +1834,11 @@ async fn credentials_secret_helpers_round_trip_with_file_keyring_backend() {let _lock = env_lock();let _keyring_guard = EnvVarGuard::set("OPENHUMAN_KEYRING_BACKEND", "file");let tmp = tempdir().expect("tempdir");- let mut config = Config::default();- config.config_path = tmp.path().join("config.toml");- config.workspace_dir = tmp.path().join("workspace");+ let mut config = Config {+ config_path: tmp.path().join("config.toml"),+ workspace_dir: tmp.path().join("workspace"),+ ..Default::default()+ };std::fs::create_dir_all(config.config_path.parent().expect("config parent")).expect("create config parent");diff --git a/tests/keyring_secretstore_e2e.rs b/tests/keyring_secretstore_e2e.rsindex b02b107e4f..5ef131b674 100644--- a/tests/keyring_secretstore_e2e.rs+++ b/tests/keyring_secretstore_e2e.rs@@ -39,7 +39,6 @@ async fn config_secrets_roundtrip_via_keyring_backed_master_key_migration() {search: openhuman_core::config::schema::SearchConfig {brave: openhuman_core::config::schema::SearchEngineCredentials {api_key: Some("brave-secret".into()),- ..Default::default()},..Default::default()},