vdev/commands/integration/
show.rs1use crate::commands::compose_tests::show::{exec, exec_environments_only};
2use crate::testing::config::INTEGRATION_TESTS_DIR;
3use anyhow::Result;
4use clap::Args;
5
6#[derive(Args, Debug)]
8#[command()]
9pub struct Cli {
10 integration: Option<String>,
12
13 #[arg(short = 'e', long)]
15 environments_only: bool,
16}
17
18impl Cli {
19 pub fn exec(self) -> Result<()> {
20 if self.environments_only {
21 exec_environments_only(
22 &self.integration.expect("test name is required"),
23 INTEGRATION_TESTS_DIR,
24 )
25 } else {
26 exec(self.integration.as_ref(), INTEGRATION_TESTS_DIR)
27 }
28 }
29}