Files
imeai-aKode/akode-rs/cli/tests/update.rs
andrea.difonzo 47d6f1eb6b Marchio: nome inviato ai server MCP e testi residui allineati ad aKode (A)
- il client MCP si presenta come "akode-mcp-client" / titolo "aKode" (prima codex-mcp-client / Codex);
- ILLEGAL_ENV_VAR_PREFIX di arg0 = "AKODE_" (le variabili AKODE_* non si caricano da .env);
- testi per l'utente (errori di contesto, "Trust this folder? aKode can read...", approvazioni,
  firma del baseline, snapshot) riportati come in aKode 0.9.2 dove la differenza era solo di nome.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 12:55:34 +01:00

25 lines
644 B
Rust

use anyhow::Result;
use predicates::str::contains;
use std::path::Path;
use tempfile::TempDir;
fn codex_command(codex_home: &Path) -> Result<assert_cmd::Command> {
let mut cmd = assert_cmd::Command::new(akode_utils_cargo_bin::cargo_bin("akode")?);
cmd.env("AKODE_HOME", codex_home);
Ok(cmd)
}
#[cfg(debug_assertions)]
#[tokio::test]
async fn update_does_not_start_interactive_prompt() -> Result<()> {
let akode_home = TempDir::new()?;
codex_command(codex_home.path())?
.arg("update")
.assert()
.failure()
.stderr(contains("`akode update` is not available in debug builds"));
Ok(())
}