summaryrefslogtreecommitdiff
path: root/tests/cli.rs
diff options
context:
space:
mode:
authorHermes Agent <hermes@localhost>2026-08-12 08:06:28 +0000
committerHermes Agent <hermes@localhost>2026-08-12 08:06:28 +0000
commitffa26f89481aa2d6259137b27cbe34f8e8330154 (patch)
tree044f67a77442df8137ad86b06d8e75e59b038347 /tests/cli.rs
parentb9d43cb9d3dc4becec598ec83614c3561d7fc771 (diff)
Allow explicit APT configuration for builds
Diffstat (limited to 'tests/cli.rs')
-rw-r--r--tests/cli.rs27
1 files changed, 26 insertions, 1 deletions
diff --git a/tests/cli.rs b/tests/cli.rs
index dfaf140..fdc38b6 100644
--- a/tests/cli.rs
+++ b/tests/cli.rs
@@ -37,14 +37,39 @@ fn parses_build_with_explicit_workspace_and_output_paths() {
Command::Build {
spec,
workspace,
- output
+ apt_config,
+ output,
} if spec == PathBuf::from("image.toml")
&& workspace == PathBuf::from("work")
+ && apt_config.is_none()
&& output == PathBuf::from("out/image.tar")
));
}
#[test]
+fn parses_build_with_an_explicit_apt_configuration() {
+ let cli = Cli::try_parse_from([
+ "alt-controller-image",
+ "build",
+ "--spec",
+ "image.toml",
+ "--workspace",
+ "work",
+ "--apt-config",
+ "repositories/alt.conf",
+ "--output",
+ "out/image.tar",
+ ])
+ .expect("build command with explicit APT configuration parses");
+
+ assert!(matches!(
+ cli.command,
+ Command::Build { apt_config, .. }
+ if apt_config == Some(PathBuf::from("repositories/alt.conf"))
+ ));
+}
+
+#[test]
fn parses_inspect_with_an_explicit_artifact_path() {
let cli = Cli::try_parse_from([
"alt-controller-image",