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:
@@ -242,28 +242,6 @@ fn print_startup_config_preserves_project_login_restrictions() -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn print_startup_config_rejects_sign_out_with_environment_access_token() -> Result<()> {
|
||||
let home = TempDir::new()?;
|
||||
let auth_path = home.path().join("auth.json");
|
||||
let saved_auth = br#"{"OPENAI_API_KEY":"saved-test-key"}"#;
|
||||
std::fs::write(&auth_path, saved_auth)?;
|
||||
for token in ["at-test-token", "header.payload.signature"] {
|
||||
let output = codex_command(home.path())?
|
||||
.env("CODEX_ACCESS_TOKEN", token)
|
||||
.args(["app-server", "--print-startup-config", "--startup-sign-out"])
|
||||
.assert()
|
||||
.failure();
|
||||
let value: serde_json::Value = serde_json::from_slice(&output.get_output().stdout)?;
|
||||
assert_eq!(
|
||||
value["error"]["message"],
|
||||
"Configured external authentication is owned by the app-server host and cannot be changed during startup recovery."
|
||||
);
|
||||
assert_eq!(std::fs::read(&auth_path)?, saved_auth);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn print_startup_config_validates_configuration() -> Result<()> {
|
||||
let home = TempDir::new()?;
|
||||
|
||||
Reference in New Issue
Block a user