vdev/commands/e2e/
start.rs

1use anyhow::Result;
2use clap::Args;
3
4use crate::testing::integration::ComposeTestLocalConfig;
5
6/// Start an environment
7#[derive(Args, Debug)]
8#[command()]
9pub struct Cli {
10    /// The e2e test name
11    test: String,
12
13    /// Whether to compile the test runner with all integration test features
14    #[arg(short = 'a', long)]
15    build_all: bool,
16
17    /// The desired environment name to start. If omitted, the first environment name is used.
18    environment: Option<String>,
19}
20
21impl Cli {
22    pub fn exec(self) -> Result<()> {
23        crate::commands::compose_tests::start::exec(
24            ComposeTestLocalConfig::e2e(),
25            &self.test,
26            self.environment.as_ref(),
27            self.build_all,
28        )
29    }
30}