We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f39c9e3 commit d982929Copy full SHA for d982929
1 file changed
tmt/tests/booted/readonly/025-test-restorecon.nu
@@ -0,0 +1,23 @@
1
+use std assert
2
+use tap.nu
3
+
4
+# Test each directory separately for better granularity
5
+let directories = ["/boot", "/etc", "/usr"]
6
7
+for dir in $directories {
8
+ tap begin $"Run restorecon on ($dir)"
9
10
+ # Run restorecon on single directory and capture trimmed output
11
+ let out = (restorecon -vnr $dir | str trim)
12
13
+ if $dir == "/boot" {
14
+ # /boot is expected to have incorrect labels - known issue
15
+ # See: https://github.com/bootc-dev/bootc/issues/1622
16
+ print $"Note: /boot restorecon output \(expected\): ($out)"
17
+ } else {
18
+ # Assert it's empty for other directories
19
+ assert equal $out "" $"restorecon run found incorrect labels in ($dir): ($out)"
20
+ }
21
22
+ tap ok
23
+}
0 commit comments