Rahul Maheshwari | c84f30c | 2019-07-30 00:29:04 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Module to test IPMI asset tag functionality. |
| 4 | Resource ../lib/ipmi_client.robot |
| 5 | Resource ../lib/openbmc_ffdc.robot |
| 6 | |
| 7 | Test Teardown FFDC On Test Case Fail |
| 8 | |
| 9 | *** Test Cases *** |
| 10 | |
| 11 | Set Asset Tag With Valid String Length |
| 12 | [Documentation] Set asset tag with valid string length and verify. |
| 13 | [Tags] Set_Asset_Tag_With_Valid_String_Length |
| 14 | # Allowed MAX characters length for asset tag name is 63. |
| 15 | ${random_string}= Generate Random String 63 |
| 16 | Run Keyword Run IPMI Standard Command dcmi set_asset_tag ${random_string} |
| 17 | |
| 18 | ${asset_tag}= Run Keyword Run IPMI Standard Command dcmi asset_tag |
| 19 | Should Contain ${asset_tag} ${random_string} |
| 20 | |
| 21 | |
| 22 | Set Asset Tag With Invalid String Length |
| 23 | [Documentation] Verify error while setting invalid asset tag via IPMI. |
| 24 | [Tags] Set_Asset_Tag_With_Invalid_String_Length |
| 25 | # Any string more than 63 character is invalid for asset tag. |
| 26 | ${random_string}= Generate Random String 64 |
| 27 | |
| 28 | ${resp}= Run Keyword And Expect Error * Run IPMI Standard Command |
| 29 | ... dcmi set_asset_tag ${random_string} |
| 30 | Should Contain ${resp} Parameter out of range ignore_case=True |