Skip to content
Closed
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
3 changes: 2 additions & 1 deletion crates/tests-integration/src/system_reinstall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ pub(crate) fn run(image: &str, testargs: libtest_mimic::Arguments) -> Result<()>
get_deployment_dir().with_context(|| "Failed to get deployment directory")?;

let files = [
"usr/lib/bootc/fedora-bootc-destructive-cleanup",
"usr/lib",
"usr/lib/systemd/system/bootc-destructive-cleanup.service",
"etc/tmpfiles.d/bootc-root-ssh.conf",
"usr/lib/bootc/fedora-bootc-destructive-cleanup",
];
Comment on lines 96 to 101
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For improved readability and maintainability, consider sorting this list of paths alphabetically.

Also, the check for "usr/lib" appears to be redundant since other paths in the list are located within it. If those checks pass, usr/lib is guaranteed to exist. If this was added for debugging, you may want to remove it.

Suggested change
let files = [
"usr/lib/bootc/fedora-bootc-destructive-cleanup",
"usr/lib",
"usr/lib/systemd/system/bootc-destructive-cleanup.service",
"etc/tmpfiles.d/bootc-root-ssh.conf",
"usr/lib/bootc/fedora-bootc-destructive-cleanup",
];
let files = [
"etc/tmpfiles.d/bootc-root-ssh.conf",
"usr/lib",
"usr/lib/bootc/fedora-bootc-destructive-cleanup",
"usr/lib/systemd/system/bootc-destructive-cleanup.service",
];


for f in files {
Expand Down