WIP fase 2b-2: rimosso login ChatGPT/OAuth/device code, agent/workload identity, backend-client; resta solo chiave API (test non tutti verdi)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-10 06:00:44 +01:00
parent 82347a58ed
commit 231e8cd136
661 changed files with 4924 additions and 64817 deletions

View File

@@ -163,18 +163,11 @@ async fn configured_daybreak_exec() -> anyhow::Result<(TestCodexExecBuilder, wir
{
let test = test_codex_exec();
let server = responses::start_mock_server().await;
let token = concat!(
"eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.",
"eyJodHRwczovL2FwaS5vcGVuYWkuY29tL2F1dGgiOnsiY2hhdGdwdF9wbGFuX3R5cGUiOiJlbnRlcnByaXNlIiwiY2hhdGdwdF9hY2NvdW50X2lkIjoid29ya3NwYWNlIn19.",
"c2lnbmF0dXJl",
);
std::fs::write(
test.home_path().join("auth.json"),
serde_json::to_vec(&json!({
"auth_mode": "chatgpt",
"tokens": {"id_token": token, "access_token": "test-token",
"refresh_token": "refresh-token", "account_id": "workspace"},
"last_refresh": "2099-01-01T00:00:00Z"
"auth_mode": "apikey",
"OPENAI_API_KEY": "test-token",
}))?,
)?;
let catalog = test.home_path().join("catalog.json");
@@ -197,21 +190,6 @@ async fn configured_daybreak_exec() -> anyhow::Result<(TestCodexExecBuilder, wir
catalog.display()
),
)?;
wiremock::Mock::given(wiremock::matchers::method("GET"))
.and(wiremock::matchers::path("/backend-api/wham/config/bundle"))
.respond_with(wiremock::ResponseTemplate::new(200).set_body_json(json!({
"config_toml": {"enterprise_managed": []}
})))
.mount(&server)
.await;
wiremock::Mock::given(wiremock::matchers::method("GET"))
.and(wiremock::matchers::path("/backend-api/wham/accounts/check"))
.respond_with(wiremock::ResponseTemplate::new(200).set_body_json(json!({
"accounts": [{"id": "workspace", "workspace_backend_origin": "https://chatgpt.com",
"account_routing_override": "NO_CONSTRAINT"}]
})))
.mount(&server)
.await;
Ok((test, server))
}