2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-18 04:10:46 +00:00

Add some UT cases for rflash that hit against the option parsing in

error situations
This commit is contained in:
Victor Hu
2017-11-08 12:58:58 -05:00
parent eee0ec90db
commit 12c5fa0d9a

View File

@ -0,0 +1,47 @@
start:rflash_check
os:Linux
mgt:openbmc
cmd:rflash $$CN --check
check:rc==0
check:output=~$$CN: BMC Firmware Product
check:output=~$$CN: HOST Firmware Product
check:rc==0
end
start:rflash_invalid_activate
cmd: rflash $$CN -a /tmp/abc123.tz
check:rc==1
check:output=~Error: Invalid option
end
start:rflash_invalid_activate_and_delete
cmd: rflash $$CN -a 123 -d 123
check:rc==1
check:output=~Error: Multiple options specified is not supported
end
start:rflash_invalid_id
cmd: rflash $$CN -a 123
check:rc==1
check:output=~Error: Invalid ID provided to activate
end
start:rflash_invalid_multiple_id_3
cmd: rflash $$CN -a 123 abc asdbas
check:rc==1
check:output=~Error: More than one firmware specified is not supported
end
start:rflash_invalid_multiple_id_2
cmd: rflash $$CN -a asdbas 123
check:rc==1
check:output=~Error: More than one firmware specified is not supported
end
start:rflash_invalid_node
cmd: rflash -a 221d9020
check:rc==1
check:output=~Error: Invalid nodes and/or groups in noderange: 221d9020
end