Test Delete Redfish Session With Invalid Token
Change-Id: I465c7b09063c5be1845b2f18bb603c6a3ce2a7ff
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/redfish_client.robot b/lib/redfish_client.robot
index eeb87cf..badb389 100644
--- a/lib/redfish_client.robot
+++ b/lib/redfish_client.robot
@@ -97,12 +97,14 @@
[Arguments] ${uri_suffix}
... ${xauth_token}
... ${timeout}=10
+ ... ${resp_check}=${1}
# Description of argument(s):
# uri_suffix The URI to establish connection with
# (e.g. 'SessionService/Sessions/XIApcw39QU').
# xauth_token Authentication token.
# timeout Timeout in seconds to establish connection with URI.
+ # resp_check By default check the response status
${base_uri} = Catenate SEPARATOR= ${REDFISH_BASE_URI} ${uri_suffix}
@@ -113,6 +115,9 @@
# Delete server session.
${resp}= Delete Request openbmc
... ${base_uri} headers=${headers} timeout=${timeout}
+
+ Return From Keyword If ${resp_check} == ${0} ${resp}
+
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
# Delete client sessions.