From c761cec8fa5129fdc8aeeede39623e92d8945439 Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Wed, 19 Apr 2017 09:52:19 -0700 Subject: Check HTTP status code on Keystone Auth request The HTTP status code was not being checked during Keystone Auth request, which causes failures to only be detected down the road when the returned JSON object is being parsed. This change adds the HTTP status code check right at point of API invocation. Change-Id: Id53582090bb1e6c3ee04b3ec5488a8b6368dedfa Signed-off-by: Gary Wu --- robot/resources/openstack/keystone_interface.robot | 1 + 1 file changed, 1 insertion(+) (limited to 'robot') diff --git a/robot/resources/openstack/keystone_interface.robot b/robot/resources/openstack/keystone_interface.robot index 63f72451..6bf1d1e7 100644 --- a/robot/resources/openstack/keystone_interface.robot +++ b/robot/resources/openstack/keystone_interface.robot @@ -29,6 +29,7 @@ Run Openstack Auth Request ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Log Sending authenticate post request ${data_path} with headers ${headers} and data ${data} ${resp}= Post Request keystone ${data_path} data=${data} headers=${headers} + Should Be True 200 <= ${resp.status_code} < 300 Save Openstack Auth ${alias} ${resp.text} Log Received response from keystone ${resp.text} -- cgit 1.2.3-korg