Skip to content
Draft
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
23 changes: 23 additions & 0 deletions tmt/tests/booted/readonly/025-test-restorecon.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
use std assert
use tap.nu

# Test each directory separately for better granularity
let directories = ["/boot", "/etc", "/usr"]

for dir in $directories {
tap begin $"Run restorecon on ($dir)"

# Run restorecon on single directory and capture trimmed output
let out = (restorecon -vnr $dir | str trim)

if $dir == "/boot" {
# /boot is expected to have incorrect labels - known issue
# See: https://github.com/bootc-dev/bootc/issues/1622
print $"Note: /boot restorecon output \(expected\): ($out)"
} else {
# Assert it's empty for other directories
assert equal $out "" $"restorecon run found incorrect labels in ($dir): ($out)"
}

tap ok
}
Loading