test: stabilize cron shell output capture and gemini warmup noop

This commit is contained in:
Chummy 2026-02-18 17:20:31 +08:00
parent ecad19d512
commit c70d9b181d
2 changed files with 8 additions and 1 deletions

View file

@ -10,6 +10,7 @@ use crate::security::SecurityPolicy;
use anyhow::Result;
use chrono::{DateTime, Utc};
use futures_util::{stream, StreamExt};
use std::process::Stdio;
use std::sync::Arc;
use tokio::process::Command;
use tokio::time::{self, Duration};
@ -430,6 +431,9 @@ async fn run_job_command_with_timeout(
.arg("-lc")
.arg(&job.command)
.current_dir(&config.workspace_dir)
.stdin(Stdio::null())
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.kill_on_drop(true)
.spawn()
{

View file

@ -689,7 +689,10 @@ mod tests {
#[tokio::test]
async fn warmup_without_key_is_noop() {
let provider = GeminiProvider::new(None);
let provider = GeminiProvider {
auth: None,
client: Client::new(),
};
let result = provider.warmup().await;
assert!(result.is_ok());
}