Skip to content

Commit 916879c

Browse files
committed
Add flag for overriding API environment in tests
1 parent e3ce0eb commit 916879c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/test-manager/src/main.rs

+10
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ enum Commands {
7474
#[arg(long, group = "display_args")]
7575
display: bool,
7676

77+
/// API and conncheck environment to use, such as `mullvad.net` or `stagemole.eu`.
78+
/// The domain name will be prefixed with `api.` and `ipv4.am.i.`
79+
#[arg(long)]
80+
environment: Option<String>,
81+
7782
/// Run VNC server on a specified port
7883
#[arg(long, group = "display_args")]
7984
vnc: Option<u16>,
@@ -236,6 +241,7 @@ async fn main() -> Result<()> {
236241
Commands::RunTests {
237242
vm,
238243
display,
244+
environment,
239245
vnc,
240246
account,
241247
app_package,
@@ -256,6 +262,10 @@ async fn main() -> Result<()> {
256262
(true, true) => unreachable!("invalid combination"),
257263
};
258264

265+
if let Some(environment) = environment {
266+
// Override environment using flag
267+
config.mullvad_host = Some(environment);
268+
}
259269
let mullvad_host = config.get_host();
260270
log::debug!("Mullvad host: {mullvad_host}");
261271

0 commit comments

Comments
 (0)