openfunctions_rs/cli/
test.rs1use crate::core::{Config, TestRunner};
4use anyhow::Result;
5use clap::Args;
6
7#[derive(Args, Debug)]
9pub struct TestCommand {
10 pub suite: Option<String>,
13}
14
15impl TestCommand {
16 pub async fn execute(&self, config: &Config) -> Result<()> {
18 let mut runner = TestRunner::new(config);
19 let results = if let Some(suite) = &self.suite {
20 runner.run_suite(suite).await?
21 } else {
22 runner.run_all().await?
23 };
24 results.print_summary();
25 Ok(())
26 }
27}