chore: Remove blocking read strings

This commit is contained in:
Jayson Reis 2026-02-18 15:52:07 +00:00 committed by Chummy
parent bc0be9a3c1
commit b9af601943
26 changed files with 331 additions and 243 deletions

View file

@ -76,20 +76,20 @@ mod tests {
use crate::config::Config;
use tempfile::TempDir;
fn test_config(tmp: &TempDir) -> Arc<Config> {
async fn test_config(tmp: &TempDir) -> Arc<Config> {
let config = Config {
workspace_dir: tmp.path().join("workspace"),
config_path: tmp.path().join("config.toml"),
..Config::default()
};
std::fs::create_dir_all(&config.workspace_dir).unwrap();
tokio::fs::create_dir_all(&config.workspace_dir).await.unwrap();
Arc::new(config)
}
#[tokio::test]
async fn removes_existing_job() {
let tmp = TempDir::new().unwrap();
let cfg = test_config(&tmp);
let cfg = test_config(&tmp).await;
let job = cron::add_job(&cfg, "*/5 * * * *", "echo ok").unwrap();
let tool = CronRemoveTool::new(cfg.clone());
@ -101,7 +101,7 @@ mod tests {
#[tokio::test]
async fn errors_when_job_id_missing() {
let tmp = TempDir::new().unwrap();
let cfg = test_config(&tmp);
let cfg = test_config(&tmp).await;
let tool = CronRemoveTool::new(cfg);
let result = tool.execute(json!({})).await.unwrap();