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:
@@ -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))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user