Test: ultimi adattamenti ai campi e agli strumenti rimossi (B)

Tolti i campi api_key dei provider nei letterali dei test, il test del tool function di
apply_patch (funzione F non portata) e i test di login --provider; i test di core, tui, cli,
exec, mcp e app-server compilano di nuovo (cargo check --tests).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-17 13:15:04 +01:00
parent 05803fcbb5
commit 875a8e4d58
9 changed files with 0 additions and 135 deletions

View File

@@ -35,36 +35,3 @@ fn create_apply_patch_freeform_tool_includes_environment_id_when_requested() {
.contains("\"*** Environment ID: \" filename LF")
);
}
#[test]
fn create_apply_patch_function_tool_takes_a_single_input_string() {
let ToolSpec::Function(tool) =
create_apply_patch_function_tool(/*include_environment_id*/ false)
else {
panic!("expected function tool");
};
assert_eq!(tool.name, "apply_patch");
assert!(tool.description.contains("*** Begin Patch"));
assert!(tool.description.contains(APPLY_PATCH_LARK_GRAMMAR));
assert!(!tool.description.contains("Environment ID"));
assert_eq!(
serde_json::to_value(&tool.parameters).expect("schema serializes"),
serde_json::json!({
"type": "object",
"properties": {
"input": {
"type": "string",
"description": "The entire contents of the apply_patch command",
},
},
"required": ["input"],
"additionalProperties": false,
})
);
let ToolSpec::Function(multi_env) =
create_apply_patch_function_tool(/*include_environment_id*/ true)
else {
panic!("expected function tool");
};
assert!(multi_env.description.contains("*** Environment ID: <id>"));
}

View File

@@ -80,7 +80,6 @@ async fn responses_stream_includes_subagent_header_on_review() {
experimental_bearer_token: None,
auth: None,
gateway_oauth: None,
api_key: None,
wire_api: WireApi::Responses,
query_params: None,
http_headers: None,
@@ -223,7 +222,6 @@ async fn responses_stream_includes_subagent_header_on_other() {
experimental_bearer_token: None,
auth: None,
gateway_oauth: None,
api_key: None,
wire_api: WireApi::Responses,
query_params: None,
http_headers: None,
@@ -347,7 +345,6 @@ async fn responses_respects_model_info_overrides_from_config() {
experimental_bearer_token: None,
auth: None,
gateway_oauth: None,
api_key: None,
wire_api: WireApi::Responses,
query_params: None,
http_headers: None,

View File

@@ -1677,7 +1677,6 @@ async fn send_provider_auth_request(server: &MockServer, auth: ModelProviderAuth
experimental_bearer_token: None,
auth: Some(auth),
gateway_oauth: None,
api_key: None,
wire_api: WireApi::Responses,
query_params: None,
http_headers: None,
@@ -2908,7 +2907,6 @@ async fn azure_responses_request_does_not_store_and_preserves_prefixed_item_ids(
experimental_bearer_token: None,
auth: None,
gateway_oauth: None,
api_key: None,
wire_api: WireApi::Responses,
query_params: None,
http_headers: None,
@@ -3746,7 +3744,6 @@ async fn azure_overrides_assign_properties_used_for_responses_url() {
experimental_bearer_token: None,
auth: None,
gateway_oauth: None,
api_key: None,
query_params: Some(std::collections::HashMap::from([(
"api-version".to_string(),
"2025-04-01-preview".into(),
@@ -3839,7 +3836,6 @@ async fn env_var_overrides_loaded_auth() {
experimental_bearer_token: None,
auth: None,
gateway_oauth: None,
api_key: None,
wire_api: WireApi::Responses,
http_headers: Some(std::collections::HashMap::from([(
"Custom-Header".to_string(),

View File

@@ -2787,7 +2787,6 @@ fn websocket_provider_with_connect_timeout(
experimental_bearer_token: None,
auth: None,
gateway_oauth: None,
api_key: None,
wire_api: WireApi::Responses,
query_params: None,
http_headers: None,

View File

@@ -72,7 +72,6 @@ async fn continue_after_stream_error() {
experimental_bearer_token: None,
auth: None,
gateway_oauth: None,
api_key: None,
wire_api: WireApi::Responses,
query_params: None,
http_headers: None,

View File

@@ -57,7 +57,6 @@ async fn retries_on_early_close() {
experimental_bearer_token: None,
auth: None,
gateway_oauth: None,
api_key: None,
wire_api: WireApi::Responses,
query_params: None,
http_headers: None,