2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 09:36:41 +00:00

Merge pull request #5058 from hu-weihua/testcases

Refine test cases based on new output
This commit is contained in:
Yuan Bai 2018-04-04 13:46:01 +08:00 committed by GitHub
commit ac7864220a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 13 deletions

View File

@ -33,7 +33,7 @@ cmd:reventlog $$CN 10 -s 1
check:output=~The -s option is not supported for OpenBMC
check:rc!=0
cmd:reventlog $$CN -s all
check:output=~The -s option is not supported for OpenBMC
check:output=~The -s option is not supported for OpenBMC|Only one option is supported at the same time for reventlog
check:rc!=0
cmd:reventlog $$CN -s
check:output=~Error: Unsupported command

View File

@ -448,22 +448,19 @@ check:rc != 0
cmd:mkdir -p /tmp/bogus123
check:rc == 0
cmd:rflash $$CN /tmp/bogus123 -d
check:output =~Error: No BMC tar file found
check:output =~Error: No Host tar file found
check:output =~Error: No BMC tar file found|Can't open directory
check:output!~Attempting to
check:rc != 0
cmd:touch /tmp/bogus123/obmc-phosphor-image-witherspoon.ubi.mtd.tar
check:rc == 0
cmd:rflash $$CN -d /tmp/bogus123
check:output =~Error: No BMC tar file found
check:output =~Error: No Host tar file found
check:output =~Error: No BMC tar file found|Can't open directory
check:output!~Attempting to
check:rc != 0
cmd:touch /tmp/bogus123/witherspoon.pnor.squashfs.tar
check:rc == 0
cmd:rflash $$CN -d /tmp/bogus123
check:output =~Error: No BMC tar file found
check:output =~Error: No Host tar file found
check:output =~Error: No BMC tar file found|Can't open directory
check:output!~Attempting to
check:rc != 0
cmd:rm -rf /tmp/bogus123

View File

@ -127,7 +127,7 @@ start:rspconfig_set_vlan
description:rspconfig change openbmc gateway
Attribute: $$CN-The operation object of rspconfig command
cmd:rspconfig $$CN vlan=0
check:output=~Error: Invalid parameter for option vlan
check:output=~Error: Invalid parameter for option vlan|Error: VLAN must be configured with IP, netmask and gateway
check:rc!=0
cmd:rspconfig $$CN vlan=111
check:output=~Error: VLAN must be configured with IP, netmask and gateway
@ -258,6 +258,7 @@ check:rc == 0
cmd:rspconfig $$CN hostname=*
check:rc == 0
check:output =~ Invalid OpenBMC Hostname
cmd:ssh __GETNODEATTR(f6u03,bmc)__ "hostname"
end
@ -342,17 +343,15 @@ cmd:rspconfig $$CN sshcfg
check:rc == 0
cmd:ssh __GETNODEATTR($$CN,bmc)__ "hostname" | tee /tmp/rspconfig_set_hostname/working_hostname
check:rc == 0
cmd:cat /tmp/rspconfig_set_hostname/working_hostname
check:rc == 0
cmd:a=$(cat /tmp/rspconfig_set_hostname/working_hostname); rspconfig $$CN hostname=test_$a |tee /tmp/rspconfig_set_hostname/rspconfig_output
check:rc == 0
cmd:grep -i 'BMC hostname' /tmp/rspconfig_set_hostname/rspconfig_output|awk -F':' '{print $3}' |sed s/\\s//g > /tmp/rspconfig_set_hostname/rspconfig_get_hostname
cmd:grep -i '$$CN: BMC hostname:' /tmp/rspconfig_set_hostname/rspconfig_output|awk -F':' '{print $3}' |sed s/\\s//g |tee /tmp/rspconfig_set_hostname/rspconfig_get_hostname
check:rc == 0
cmd:ssh __GETNODEATTR($$CN,bmc)__ "hostname" | tee /tmp/rspconfig_set_hostname/new_working_hostname
check:rc == 0
cmd:diff /tmp/rspconfig_set_hostname/rspconfig_get_hostname /tmp/rspconfig_set_hostname/new_working_hostname
cmd:diff -y /tmp/rspconfig_set_hostname/rspconfig_get_hostname /tmp/rspconfig_set_hostname/new_working_hostname
check:rc == 0
cmd:diff /tmp/rspconfig_set_hostname/new_working_hostname /tmp/rspconfig_set_hostname/working_hostname
cmd:diff -y /tmp/rspconfig_set_hostname/new_working_hostname /tmp/rspconfig_set_hostname/working_hostname
check:rc != 0
cmd:a=test_$(cat /tmp/rspconfig_set_hostname/working_hostname);b=$(cat /tmp/rspconfig_set_hostname/new_working_hostname);echo "a=$a b=$b";if [ "$a" = "$b" ];then exit 0;else exit 1; fi
check:rc == 0