mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-18 12:20:40 +00:00
Add some UT cases for rflash that hit against the option parsing in
error situations
This commit is contained in:
47
xCAT-test/autotest/testcase/UT_openbmc/rflash_cases0
Normal file
47
xCAT-test/autotest/testcase/UT_openbmc/rflash_cases0
Normal 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
|
||||
|
||||
|
Reference in New Issue
Block a user