Test IPMI cipher suites.
Test cases added:
- Verify supported cipher list.
- Verify unsupported cipher list.
Resolves openbmc/openbmc-test-automation#1447
Change-Id: Ibd6e4444ad36d39fea80cd57dd0afa007c3a53c8
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/data/ipmi_raw_cmd_table.py b/data/ipmi_raw_cmd_table.py
index b4766dc..1e216bd 100644
--- a/data/ipmi_raw_cmd_table.py
+++ b/data/ipmi_raw_cmd_table.py
@@ -11,7 +11,8 @@
# Refer:
# openbmc/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipe
# s-phosphor/ipmi/phosphor-ipmi-host/cipher_list.json
-valid_cipher_list = [1, 2, 3, 15, 16, 17]
+valid_cipher_list = [3, 17]
+unsupported_cipher_list = [1, 2, 15, 16]
IPMI_RAW_CMD = {
# Interface name
diff --git a/tests/ipmi/test_general_ipmi.robot b/tests/ipmi/test_general_ipmi.robot
index f4b9e4c..a75a5b4 100644
--- a/tests/ipmi/test_general_ipmi.robot
+++ b/tests/ipmi/test_general_ipmi.robot
@@ -24,7 +24,18 @@
[Tags] Verify_Supported_Cipher_List
:FOR ${cipher_level} IN @{valid_cipher_list}
- \ Execute IPMI Command With Cipher ${cipher_level}
+ \ ${status}= Execute IPMI Command With Cipher ${cipher_level}
+ \ Should Be Equal ${status} ${0}
+
+
+Verify Unsupported Cipher List
+ [Documentation] Execute all unsupported cipher levels and verify error.
+ [Tags] Verify_Unsupported_Cipher_List
+
+ :FOR ${cipher_level} IN @{unsupported_cipher_list}
+ \ ${status}= Execute IPMI Command With Cipher ${cipher_level}
+ \ Should Be Equal ${status} ${1}
+
Set Asset Tag With Valid String Length
[Documentation] Set asset tag with valid string length and verify.
@@ -778,4 +789,4 @@
... ${SPACE}${HOST}${SPACE}${OPENBMC_HOST}${SPACE}mc info
${rc} ${output}= Run And Return RC and Output ${ipmi_cmd}
- Should Be Equal ${rc} ${0} msg=${output}
+ [Return] ${rc}