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    /// Reuse existing test runner image instead of rebuilding (useful in CI)
18    #[arg(long)]
19    reuse_image: bool,
20
21    /// The desired environment name to start. If omitted, the first environment name is used.
22    environment: Option<String>,
23}
24
25impl Cli {
26    pub fn exec(self) -> Result<()> {
27        crate::commands::compose_tests::start::exec(
28            ComposeTestLocalConfig::e2e(),
29            &self.test,
30            self.environment.as_ref(),
31            self.build_all,
32            self.reuse_image,
33        )
34    }
35}