2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 11:42:05 +00:00

Merge pull request #5714 from hu-weihua/caseupdate

Update some outdated test cases
This commit is contained in:
xuweibj 2018-10-18 16:18:25 +08:00 committed by GitHub
commit 31f5bfd8a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 17 deletions

View File

@ -25,7 +25,7 @@ hcp:openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd:reventlog $$CN resolved 1,2,3
check:rc==1
check:output=~Error: (\[.*?\]: )?Usage error. Provide a comma separated
check:output=~Error: (\[.*?\]: )?Only one option is supported at the same time for reventlog
end
start:reventlog_resolved_parse_error4
@ -35,7 +35,7 @@ hcp:openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd:reventlog $$CN resolved=-1
check:rc==1
check:output=~Error: (\[.*?\]: )?Invalid ID=
check:output=~Error: (\[.*?\]: )?Invalid ID:
end
start:reventlog_resolved_parse_error5
@ -45,7 +45,7 @@ hcp:openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd:reventlog $$CN resolved=abc
check:rc==1
check:output=~Error: (\[.*?\]: )?Invalid ID=
check:output=~Error: (\[.*?\]: )?Invalid ID:
end
start:reventlog_resolved_list
@ -54,7 +54,7 @@ os:Linux
hcp:openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd:reventlog $$CN resolved=100,101
check:rc==0
check:rc==1
check:output=~Attempting to resolve the following log entries: 100,101...
end
@ -64,6 +64,6 @@ os:Linux
hcp:openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd:reventlog $$CN resolved=Led
check:rc==0
check:rc==1
check:output=~Attempting to resolve the following log entries: Led...
end

View File

@ -50,7 +50,7 @@ check:output=~$$CN: BMC Hostname:
# Set to witherspoon first
cmd:rspconfig $$CN hostname=witherspoon
check:rc==0
check:output=~$$CN: BMC Setting Hostname...
check:output=~$$CN: BMC Setting BMC Hostname...
# Check that it's set to witherspoon
cmd:rspconfig $$CN hostname
check:rc==0
@ -58,7 +58,7 @@ check:output=~$$CN: BMC Hostname: witherspoon
# Set to <host>-UTset
cmd:rspconfig $$CN hostname=$$CN-UTset
check:rc==0
check:output=~$$CN: BMC Setting Hostname...
check:output=~$$CN: BMC Setting BMC Hostname...
# Check that it's set
cmd:rspconfig $$CN hostname
check:rc==0
@ -66,7 +66,7 @@ check:output=~$$CN: BMC Hostname: $$CN-UTset
# Restore to saved version
cmd:grep BMC /tmp/xcattest.rspconfig.hostname | cut -d' ' -f4 | xargs -i{} rspconfig $$CN hostname={}
check:rc==0
check:output=~$$CN: BMC Setting Hostname...
check:output=~$$CN: BMC Setting BMC Hostname...
cmd:rspconfig $$CN hostname
check:rc==0
check:output=~$$CN: BMC Hostname:

View File

@ -1,20 +1,29 @@
start:setup_vm
description:set up vm environment
cmd:var=`expr substr "__GETNODEATTR($$CN,vmstorage)__" 1 3`;echo $var;if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ];then rmvm $$CN -f -p;if [[ "$var" = "phy" ]]; then mkvm $$CN;exit $? ; elif [[ "$var" = "dir" ]];then mkvm $$CN ; rmvm $$CN -f -p ; mkvm $$CN -s 20G ;exit $? ;elif [ "$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me. ";exit 2;else echo "Could not surpport vmstorage.";exit 3;fi;fi
description:reset up vm environment if need
label:others
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ];then echo "CN node $$CN is a vm which mgt is __GETNODEATTR($$CN,mgt)__, start to recreate the vm now"; echo "rmvm $$CN -f -p";rpower $$CN off; sleep 3; rmvm $$CN -f -p; var=`expr substr "__GETNODEATTR($$CN,vmstorage)__" 1 3`; echo "The disk create way of $$CN is $var"; if [ "$var" = "phy" ]; then echo "mkvm $$CN"; mkvm $$CN; exit $?; elif [ "$var" = "dir" ]; then echo "mkvm $$CN -s 20G"; mkvm $$CN -s 20G; exit $?; elif ["$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me"; exit 2; else echo "unsupported disk creation way"; exit 3;fi;else echo "CN node $$CN is a non-VM; do not need to recreate it";fi
check:rc==0
cmd:rpower $$CN on
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ]; then echo "CN node is a vm, need to repower it on"; echo "rpower $$CN on"; rpower $$CN on; else echo "CN node $$CN is a non-VM; do not need to repower on it"; fi
check:rc==0
cmd:rpower $$CN stat
check:output=~on
cmd:var=`expr substr "__GETNODEATTR($$SN,vmstorage)__" 1 3`;echo $var;if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ];then rmvm $$SN -f -p;if [[ "$var" = "phy" ]]; then mkvm $$SN;exit $? ; elif [[ "$var" = "dir" ]];then mkvm $$SN ; rmvm $$SN -f -p ; mkvm $$SN -s 20G ;exit $? ;elif [ "$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me. ";exit 2;else echo "Could not surpport vmstorage.";exit 3;fi;fi
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ]; then tabdump -w node==$$CN kvm_nodedata; fi
check:rc==0
cmd:rpower $$SN on
cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" -a "__GETNODEATTR($$SN,mgt)__" != "openbmc" ];then echo "SN node $$SN is a vm which mgt is __GETNODEATTR($$SN,mgt)__, start to recreate the vm now"; echo "rmvm $$SN -f -p"; rpower $$SN off; sleep 3; rmvm $$SN -f -p; var=`expr substr "__GETNODEATTR($$SN,vmstorage)__" 1 3`; echo "The disk create way of $$SN is $var"; if [ "$var" = "phy" ]; then echo "mkvm $$SN"; mkvm $$SN; exit $?; elif [ "$var" = "dir" ]; then echo "mkvm $$SN -s 20G"; mkvm $$SN -s 20G; exit $?; elif ["$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me"; exit 2; else echo "unsupported disk creation way"; exit 3;fi;else echo "SN node $$SN is a non-VM; do not need to recreate it";fi
check:rc==0
cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" -a "__GETNODEATTR($$SN,mgt)__" != "openbmc" ];then echo "SN node $$SN is a VM, need to rpower it on"; echo "rpower $$SN on"; rpower $$SN on; fi
check:rc==0
cmd:rpower $$SN stat
check:output=~on
#Add for debug rmvm issue
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]; then tabdump -w node==$$CN kvm_nodedata; fi
check:rc==0
cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" ]; then tabdump -w node==$$SN kvm_nodedata; fi
cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" -a "__GETNODEATTR($$SN,mgt)__" != "openbmc" ]; then tabdump -w node==$$SN kvm_nodedata; fi
check:rc==0
end

View File

@ -4,7 +4,7 @@ os:Linux
hcp:openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN ipsrc
check:output=~$$CN\s*:\s*BMC IP Source: Static|BMC IP Source: Dynamic
check:output=~$$CN\s*:\s*BMC IP Source: Static|BMC IP Source: DHCP
check:rc == 0
cmd:rspconfig $$CN hostname sshcfg
check:output =~Error: (\[.*?\]: )?Configure sshcfg must be issued without other options.