2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 10:06:39 +00:00

modify hardware control testcase for physical machine

This commit is contained in:
junxiawang 2017-07-28 07:45:23 -04:00
parent 87e62ec8d4
commit 939c75cad0
3 changed files with 8 additions and 15 deletions

View File

@ -1,6 +1,6 @@
start:reventlog_null
cmd:reventlog
check:rc!=0
check:rc==0
check:output=~Usage
end
start:reventlog_all
@ -11,12 +11,12 @@ end
start:reventlog_clear
cmd:reventlog $$CN clear
check:rc==0
check:output=~$$CN\s*:\s*clear
check:output=~$$CN\s*:\s*clear |SEL cleared
end
start:reventlog_numofentries
cmd:reventlog $$CN 5
check:rc==0
check:output=~$$CN\s*:\s*.*\d\d/\d\d/\d\d\s*\S+
check:output=~$$CN\s*:\s*.*\d\d/\d\d/\d\d\s*\S+ |$$CN: no SEL entries
cmd:reventlog $$CN 3 | wc -l
check:output=~\s*3\s*
check:output=~\s*1\s*
end

View File

@ -106,7 +106,7 @@ cmd:chdef -p -t node -o $$CN groups="test"
check:rc==0
cmd:rinv test all
check:rc==1
check:output=~$$CN: SYSTEM
check:output=~$$CN: SYSTEM |$$CN: System
cmd:chdef -m -t node -o $$CN groups="test"
check:rc==0
cmd:rmdef testnode;if [[ -e /tmp/testnode.stanza ]]; then cat /tmp/testnode.stanza | chdef -z;rm -rf /tmp/testnode.stanza;fi
@ -129,5 +129,5 @@ start:rinv_errorcommand
description:get right return if input error command
cmd:rinv $$CN dafds
check:rc==1
check:output=~Unsupported command
check:output=~Unsupported command|Error: Usage:
end

View File

@ -91,15 +91,8 @@ end
start:rpower_reset
description:This case is to test reset option could hard reset nodes when nodes are in on state.
Attribute: $$CN-The operation object of rpower command
cmd:rpower $$CN on
cmd:a=0;while ! `rpower $$CN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
cmd:rpower $$CN stat
check:ouptut=~Running|on
cmd:rpower $$CN reset
cmd:stat=`rpower $$CN stat`;if ([[ $stat =~ on ]] || [[ $stat =~ Running ]]) ;then rpower $$CN reset;sleep 30;stat1=`rpower $$CN stat`;if ([[ $stat1 =~ on ]] || [[ $stat1 =~ Running ]]);then exit 0;else exit 1;fi;else rpower $$CN reset;sleep 30;stat1=`rpower $$CN stat`;if ([[ $stat1 =~ off ]] || [[ $stat1 =~ "Not Activated" ]]);then exit 0;else exit 1;fi;fi
check:rc==0
cmd:a=0;while ! `rpower $$CN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
cmd:rpower $$CN stat
check:output=~Running|on
end
start:rpower_noderange
@ -107,7 +100,7 @@ description:This case is to test rpower could process error usage and return hel
Attribute: $$CN-The operation object of rpower command
cmd:rpower $$CN
check:rc!=0
check:output=~Unsupported|Usage
check:output=~Unsupported|Usage|Please enter an action
end
start:rpower_noderange_nodeps