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