mirror of
https://github.com/openai/codex.git
synced 2026-11-21 22:50:37 +00:00
chore: enforce argument-comment lint across all targets
This commit is contained in:
@@ -276,12 +276,12 @@ mod tests {
|
||||
let status = determine_streamable_http_auth_status(
|
||||
"server",
|
||||
"not-a-url",
|
||||
None,
|
||||
/*bearer_token_env_var*/ None,
|
||||
Some(HashMap::from([(
|
||||
"Authorization".to_string(),
|
||||
"Bearer token".to_string(),
|
||||
)])),
|
||||
None,
|
||||
/*env_http_headers*/ None,
|
||||
OAuthCredentialsStoreMode::Keyring,
|
||||
)
|
||||
.await
|
||||
@@ -297,8 +297,8 @@ mod tests {
|
||||
let status = determine_streamable_http_auth_status(
|
||||
"server",
|
||||
"not-a-url",
|
||||
None,
|
||||
None,
|
||||
/*bearer_token_env_var*/ None,
|
||||
/*http_headers*/ None,
|
||||
Some(HashMap::from([(
|
||||
"Authorization".to_string(),
|
||||
"CODEX_RMCP_CLIENT_AUTH_STATUS_TEST_TOKEN".to_string(),
|
||||
@@ -320,10 +320,14 @@ mod tests {
|
||||
}))
|
||||
.await;
|
||||
|
||||
let discovery = discover_streamable_http_oauth(&server.url, None, None)
|
||||
.await
|
||||
.expect("discovery should succeed")
|
||||
.expect("oauth support should be detected");
|
||||
let discovery = discover_streamable_http_oauth(
|
||||
&server.url,
|
||||
/*http_headers*/ None,
|
||||
/*env_http_headers*/ None,
|
||||
)
|
||||
.await
|
||||
.expect("discovery should succeed")
|
||||
.expect("oauth support should be detected");
|
||||
|
||||
assert_eq!(
|
||||
discovery.scopes_supported,
|
||||
@@ -340,10 +344,14 @@ mod tests {
|
||||
}))
|
||||
.await;
|
||||
|
||||
let discovery = discover_streamable_http_oauth(&server.url, None, None)
|
||||
.await
|
||||
.expect("discovery should succeed")
|
||||
.expect("oauth support should be detected");
|
||||
let discovery = discover_streamable_http_oauth(
|
||||
&server.url,
|
||||
/*http_headers*/ None,
|
||||
/*env_http_headers*/ None,
|
||||
)
|
||||
.await
|
||||
.expect("discovery should succeed")
|
||||
.expect("oauth support should be detected");
|
||||
|
||||
assert_eq!(discovery.scopes_supported, None);
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ mod tests {
|
||||
let value = "from-env";
|
||||
let expected = OsString::from(value);
|
||||
let _guard = EnvVarGuard::set(custom_var, value);
|
||||
let env = create_env_for_mcp_server(None, &[custom_var.to_string()]);
|
||||
let env = create_env_for_mcp_server(/*extra_env*/ None, &[custom_var.to_string()]);
|
||||
assert_eq!(env.get(OsStr::new(custom_var)), Some(&expected));
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ mod tests {
|
||||
let expected = raw_path.to_os_string();
|
||||
let _guard = EnvVarGuard::set("PATH", raw_path);
|
||||
|
||||
let env = create_env_for_mcp_server(None, &[]);
|
||||
let env = create_env_for_mcp_server(/*extra_env*/ None, &[]);
|
||||
|
||||
assert_eq!(env.get(OsStr::new("PATH")), Some(&expected));
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ async fn drop_kills_wrapper_process_group() -> Result<()> {
|
||||
OsString::from(child_pid_file_str),
|
||||
)])),
|
||||
&[],
|
||||
None,
|
||||
/*cwd*/ None,
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
||||
@@ -58,9 +58,9 @@ async fn rmcp_client_can_list_and_read_resources() -> anyhow::Result<()> {
|
||||
let client = RmcpClient::new_stdio_client(
|
||||
stdio_server_bin()?.into(),
|
||||
Vec::<OsString>::new(),
|
||||
None,
|
||||
/*env*/ None,
|
||||
&[],
|
||||
None,
|
||||
/*cwd*/ None,
|
||||
)
|
||||
.await?;
|
||||
|
||||
@@ -82,7 +82,7 @@ async fn rmcp_client_can_list_and_read_resources() -> anyhow::Result<()> {
|
||||
.await?;
|
||||
|
||||
let list = client
|
||||
.list_resources(None, Some(Duration::from_secs(5)))
|
||||
.list_resources(/*params*/ None, Some(Duration::from_secs(5)))
|
||||
.await?;
|
||||
let memo = list
|
||||
.resources
|
||||
@@ -104,7 +104,7 @@ async fn rmcp_client_can_list_and_read_resources() -> anyhow::Result<()> {
|
||||
.no_annotation()
|
||||
);
|
||||
let templates = client
|
||||
.list_resource_templates(None, Some(Duration::from_secs(5)))
|
||||
.list_resource_templates(/*params*/ None, Some(Duration::from_secs(5)))
|
||||
.await?;
|
||||
assert_eq!(
|
||||
templates,
|
||||
|
||||
@@ -74,8 +74,8 @@ async fn create_client(base_url: &str) -> anyhow::Result<RmcpClient> {
|
||||
"test-streamable-http",
|
||||
&format!("{base_url}/mcp"),
|
||||
Some("test-bearer".to_string()),
|
||||
None,
|
||||
None,
|
||||
/*http_headers*/ None,
|
||||
/*env_http_headers*/ None,
|
||||
OAuthCredentialsStoreMode::File,
|
||||
)
|
||||
.await?;
|
||||
@@ -105,7 +105,7 @@ async fn call_echo_tool(client: &RmcpClient, message: &str) -> anyhow::Result<Ca
|
||||
.call_tool(
|
||||
"echo".to_string(),
|
||||
Some(json!({ "message": message })),
|
||||
None,
|
||||
/*meta*/ None,
|
||||
Some(Duration::from_secs(5)),
|
||||
)
|
||||
.await
|
||||
@@ -194,7 +194,7 @@ async fn streamable_http_404_session_expiry_recovers_and_retries_once() -> anyho
|
||||
let warmup = call_echo_tool(&client, "warmup").await?;
|
||||
assert_eq!(warmup, expected_echo_result("warmup"));
|
||||
|
||||
arm_session_post_failure(&base_url, 404, 1).await?;
|
||||
arm_session_post_failure(&base_url, /*status*/ 404, /*remaining*/ 1).await?;
|
||||
|
||||
let recovered = call_echo_tool(&client, "recovered").await?;
|
||||
assert_eq!(recovered, expected_echo_result("recovered"));
|
||||
@@ -210,7 +210,7 @@ async fn streamable_http_401_does_not_trigger_recovery() -> anyhow::Result<()> {
|
||||
let warmup = call_echo_tool(&client, "warmup").await?;
|
||||
assert_eq!(warmup, expected_echo_result("warmup"));
|
||||
|
||||
arm_session_post_failure(&base_url, 401, 2).await?;
|
||||
arm_session_post_failure(&base_url, /*status*/ 401, /*remaining*/ 2).await?;
|
||||
|
||||
let first_error = call_echo_tool(&client, "unauthorized").await.unwrap_err();
|
||||
assert!(first_error.to_string().contains("401"));
|
||||
@@ -231,7 +231,7 @@ async fn streamable_http_404_recovery_only_retries_once() -> anyhow::Result<()>
|
||||
let warmup = call_echo_tool(&client, "warmup").await?;
|
||||
assert_eq!(warmup, expected_echo_result("warmup"));
|
||||
|
||||
arm_session_post_failure(&base_url, 404, 2).await?;
|
||||
arm_session_post_failure(&base_url, /*status*/ 404, /*remaining*/ 2).await?;
|
||||
|
||||
let error = call_echo_tool(&client, "double-404").await.unwrap_err();
|
||||
assert!(
|
||||
@@ -255,7 +255,7 @@ async fn streamable_http_non_session_failure_does_not_trigger_recovery() -> anyh
|
||||
let warmup = call_echo_tool(&client, "warmup").await?;
|
||||
assert_eq!(warmup, expected_echo_result("warmup"));
|
||||
|
||||
arm_session_post_failure(&base_url, 500, 2).await?;
|
||||
arm_session_post_failure(&base_url, /*status*/ 500, /*remaining*/ 2).await?;
|
||||
|
||||
let first_error = call_echo_tool(&client, "server-error").await.unwrap_err();
|
||||
assert!(first_error.to_string().contains("500"));
|
||||
|
||||
Reference in New Issue
Block a user