Modified Hardcoded channel Number as 1 to dynamic.
While Getting user info using "Get User Info" keyword by default
it will return channel numebr 1 user. we have to mention the channel
number to get the particular channel user info. So for Get User Info
keyword added ${CHANNEL_NUMBER} variable as argument.
And also while getting channel access we are hardcoding the channel
number as 1, there are removed 1 and added ${CHANNEL_NUMBER}.
Tested: Run robot ipmi/test_ipmi_user.robot
Run robot ipmi/test_ipmi_payload.robot
Run robot redfish/account_service/test_ipmi_redfish_user.robot
Change-Id: Id81b59e7880045b74e65195089e38d8653f66d7a
Signed-off-by: Nagarjun B <nagarjunb@ami.com>
diff --git a/ipmi/test_ipmi_user.robot b/ipmi/test_ipmi_user.robot
index 5d6a593..9b020c8 100644
--- a/ipmi/test_ipmi_user.robot
+++ b/ipmi/test_ipmi_user.robot
@@ -245,7 +245,7 @@
Set Test Variable ${random_userid}
# Delete IPMI User and verify
Run IPMI Standard Command user set name ${random_userid} ""
- ${user_info}= Get User Info ${random_userid}
+ ${user_info}= Get User Info ${random_userid} ${CHANNEL_NUMBER}
Should Be Equal ${user_info['user_name']} ${EMPTY}
@@ -336,7 +336,7 @@
# Disable IPMI user and verify.
Run IPMI Standard Command user disable ${random_userid}
- ${user_info}= Get User Info ${random_userid}
+ ${user_info}= Get User Info ${random_userid} ${CHANNEL_NUMBER}
Should Be Equal ${user_info['enable_status']} disabled
# Verify that disabled IPMI user is unable to run IPMI command.
@@ -756,7 +756,7 @@
Check Enabled User Count
FOR ${num} IN RANGE 300
${random_userid}= Evaluate random.randint(1, ${expected_max_ids}) modules=random
- ${access}= Run IPMI Standard Command channel getaccess 1 ${random_userid}
+ ${access}= Run IPMI Standard Command channel getaccess ${CHANNEL_NUMBER} ${random_userid}
${name_line}= Get Lines Containing String ${access} User Name
Log To Console For ID ${random_userid}: ${name_line}