Robot Framework 7.0 changes
Update robot code syntax overall in the repo
Changes:
- Update the requirement.txt package version for robot
- The '[Return]' setting is deprecated.
Use the 'RETURN' statement instead.
- Singular section headers like '*** Test Case ***'
are deprecated. Use plural format like
'*** Test Cases ***' instead.
- Singular section headers like '*** Variable ***'
are deprecated
Tested:
- Ran from sandbox with the version
$ robot --version
Robot Framework 7.0 (Python 3.10.12 on linux)
and also tested on latest python version
Robot Framework 7.0 (Python 3.11.9 on linux)
Change-Id: I54e85f9d799556c63b9a39f79483f83e9b980768
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/account_service/test_ipmi_redfish_user.robot b/redfish/account_service/test_ipmi_redfish_user.robot
index 02a95c9..9edc497 100644
--- a/redfish/account_service/test_ipmi_redfish_user.robot
+++ b/redfish/account_service/test_ipmi_redfish_user.robot
@@ -285,7 +285,7 @@
Run Keyword If '${privilege}' != '0'
... Set Channel Access ${random_userid} ipmi=on privilege=${privilege}
- [Return] ${random_username} ${random_userid}
+ RETURN ${random_username} ${random_userid}
Delete Users Via Redfish
@@ -336,4 +336,4 @@
Exit For Loop If ${is_empty} == ${True}
END
Run Keyword If '${jj}' == '299' Fail msg=A free user ID could not be found.
- [Return] ${random_userid}
+ RETURN ${random_userid}
diff --git a/redfish/account_service/test_ldap_configuration.robot b/redfish/account_service/test_ldap_configuration.robot
index d484900..28119e2 100644
--- a/redfish/account_service/test_ldap_configuration.robot
+++ b/redfish/account_service/test_ldap_configuration.robot
@@ -697,7 +697,7 @@
# ldap_type The LDAP type ("ActiveDirectory" or "LDAP").
${ldap_config}= Redfish.Get Properties ${REDFISH_BASE_URI}AccountService
- [Return] ${ldap_config["${ldap_type}"]}
+ RETURN ${ldap_config["${ldap_type}"]}
Update LDAP Configuration with LDAP User Role And Group
@@ -725,7 +725,7 @@
${num_list_entries}= Get Length ${ldap_config["RemoteRoleMapping"]}
Return From Keyword If ${num_list_entries} == ${0} @{EMPTY}
- [Return] ${ldap_config["RemoteRoleMapping"][0]["LocalRole"]}
+ RETURN ${ldap_config["RemoteRoleMapping"][0]["LocalRole"]}
Restore LDAP Privilege
diff --git a/redfish/account_service/test_redfish_privilege_registry.robot b/redfish/account_service/test_redfish_privilege_registry.robot
index 88ceceb..5225162 100644
--- a/redfish/account_service/test_redfish_privilege_registry.robot
+++ b/redfish/account_service/test_redfish_privilege_registry.robot
@@ -195,7 +195,7 @@
... /redfish/v1/Registries/PrivilegeRegistry/
@{location}= Get From Dictionary ${resp.dict} Location
${uri}= Set Variable ${location[0]['Uri']}
- [Return] ${uri}
+ RETURN ${uri}
Create And Verify Various Privilege Users
[Documentation] Create and verify admin, test, operator, and readonly users.
diff --git a/redfish/account_service/test_user_account.robot b/redfish/account_service/test_user_account.robot
index 5c50698..40d82b1 100644
--- a/redfish/account_service/test_user_account.robot
+++ b/redfish/account_service/test_user_account.robot
@@ -622,7 +622,7 @@
Run Keyword And Ignore Error Redfish.Logout
${status}= Run Keyword And Return Status Redfish.Login ${username} ${password}
- [Return] ${status}
+ RETURN ${status}
Redfish Create And Verify User