Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused --verbose feature from pack build command utils #738

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions libcnb-test/src/pack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pub(crate) struct PackBuildCommand {
path: PathBuf,
pull_policy: PullPolicy,
trust_builder: bool,
verbose: bool,
}

#[derive(Clone, Debug)]
Expand Down Expand Up @@ -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,
}
}

Expand Down Expand Up @@ -119,10 +117,6 @@ impl From<PackBuildCommand> for Command {
command.arg("--trust-builder");
}

if pack_build_command.verbose {
command.arg("--verbose");
}

command
}
}
Expand Down Expand Up @@ -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();
Expand All @@ -210,7 +203,6 @@ mod tests {
"--env",
"ENV_FOO=FOO_VALUE",
"--trust-builder",
"--verbose"
]
);

Expand All @@ -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]
Expand Down