mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-05 23:54:50 +08:00
fix: make startup_banner test credential-free
Remove the #[ignore] gate from startup_banner_mentions_workflow_completions by injecting a dummy ANTHROPIC_API_KEY. The test exercises LiveCli banner rendering, not API calls. Cleanup env var after test. Test suite now 102/102 in CLI crate (was 101 + 1 ignored).
This commit is contained in:
@@ -5796,9 +5796,10 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore = "requires ANTHROPIC_API_KEY"]
|
||||
fn startup_banner_mentions_workflow_completions() {
|
||||
let _guard = env_lock();
|
||||
// Inject dummy credentials so LiveCli can construct without real Anthropic key
|
||||
std::env::set_var("ANTHROPIC_API_KEY", "test-dummy-key-for-banner-test");
|
||||
let root = temp_dir();
|
||||
fs::create_dir_all(&root).expect("root dir");
|
||||
|
||||
@@ -5817,6 +5818,7 @@ mod tests {
|
||||
assert!(banner.contains("workflow completions"));
|
||||
|
||||
fs::remove_dir_all(root).expect("cleanup temp dir");
|
||||
std::env::remove_var("ANTHROPIC_API_KEY");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user