From 66d148bdab715b1299a24fb0ff3120b603b46f48 Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Thu, 16 Nov 2023 10:36:29 +0000 Subject: [PATCH] Remove unused `--verbose` feature from pack build command utils (#738) Since: - this feature was exposed internally only and was unused - the use cases that might have warranted exposing verbose mode through the public APIs are redundant after upstream `lifecycle` improvements: https://github.com/heroku/libcnb.rs/issues/383#issuecomment-1813035658 GUS-W-14502304. --- libcnb-test/src/pack.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/libcnb-test/src/pack.rs b/libcnb-test/src/pack.rs index c2c406c2..65e26d01 100644 --- a/libcnb-test/src/pack.rs +++ b/libcnb-test/src/pack.rs @@ -13,7 +13,6 @@ pub(crate) struct PackBuildCommand { path: PathBuf, pull_policy: PullPolicy, trust_builder: bool, - verbose: bool, } #[derive(Clone, Debug)] @@ -67,7 +66,6 @@ impl PackBuildCommand { // Prevent redundant image-pulling, which slows tests and risks hitting registry rate limits. pull_policy: PullPolicy::IfNotPresent, trust_builder: true, - verbose: false, } } @@ -119,10 +117,6 @@ impl From for Command { command.arg("--trust-builder"); } - if pack_build_command.verbose { - command.arg("--verbose"); - } - command } } @@ -183,7 +177,6 @@ mod tests { path: PathBuf::from("/tmp/foo/bar"), pull_policy: PullPolicy::IfNotPresent, trust_builder: true, - verbose: true, }; let command: Command = input.clone().into(); @@ -210,7 +203,6 @@ mod tests { "--env", "ENV_FOO=FOO_VALUE", "--trust-builder", - "--verbose" ] ); @@ -222,11 +214,6 @@ mod tests { assert!(!command .get_args() .any(|arg| arg == OsStr::new("--trust-builder"))); - - // Assert conditional '--verbose' flag works as expected: - input.verbose = false; - let command: Command = input.into(); - assert!(!command.get_args().any(|arg| arg == OsStr::new("--verbose"))); } #[test]