Delete first session created.
Change-Id: Ica414d81576c68151f05fe1c05f107bf7528b645
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/service_root/test_service_root.robot b/redfish/service_root/test_service_root.robot
index e6ae47a..3d3ce57 100644
--- a/redfish/service_root/test_service_root.robot
+++ b/redfish/service_root/test_service_root.robot
@@ -68,6 +68,8 @@
[Tags] Delete_Redfish_Session_Using_Valid_Login
Redfish.Login
+ ${session_info}= Get Redfish Session Info
+
Redfish.Login
# Example o/p:
@@ -75,10 +77,11 @@
# {'@odata.id': '/redfish/v1/SessionService/Sessions/Yu3xFqjZr1'}]
${resp_list}= Redfish_Utils.List Request
... /redfish/v1/SessionService/Sessions
- Redfish.Delete ${resp_list[1]}
+
+ Redfish.Delete ${session_info["location"]}
${resp}= Redfish_Utils.List Request /redfish/v1/SessionService/Sessions
- List Should Not Contain Value ${resp} ${resp_list[1]}
+ List Should Not Contain Value ${resp} ${session_info["location"]}
*** Keywords ***