mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-22 10:22:18 +00:00
fix(xcat-test): the xcatmn probe case reports an empty output as a failure
The case ran xcatprobe xcatmn through grep -i selinux and checked the rc of the pipeline. Nothing in the output named SELinux, so grep exited 1, the case failed with an empty output, and the log carries no checkpoint and no reason. The probe prints every checkpoint, so the diagnostics existed and the filter threw them away. The case now runs the probe with -H, which runs the checks on this node instead of dispatching them, and keeps the whole output. It asserts that the SELinux checkpoint is marked [ OK ] and is not marked [FAIL], which xcatprobe writes for a checkpoint that passes and one that fails. It no longer asserts the rc of the probe: a management node under test can report another checkpoint as a problem, and that is not this case. probe_xcatmn_selinux_case.t fails 3 of its 11 checks without this change, on rome01. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
start:xcatprobe_xcatmn_selinux
|
||||
description:To test if xcatprobe xcatmn reports the SELinux mode of the management node, and does not report that mode as a failure. This case must run in xcat mn
|
||||
description:To test if xcatprobe xcatmn reports the SELinux policy of the management node, and does not report it as a problem. The output is not filtered, so a failure of any checkpoint is in the log. -H runs the checks on this node, instead of dispatching them. This case must run in xcat mn
|
||||
label:mn_only,ci_test
|
||||
cmd:xcatprobe xcatmn 2>&1 | grep -i selinux
|
||||
check:rc==0
|
||||
check:output!~FAIL
|
||||
cmd:xcatprobe xcatmn -H 2>&1
|
||||
check:output=~Checking SELinux policy for xCAT\.\.\..*\[ OK \]
|
||||
check:output!~Checking SELinux policy for xCAT\.\.\..*\[FAIL\]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user