diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2017-04-19 09:52:19 -0700 |
---|---|---|
committer | Gary Wu <gary.i.wu@huawei.com> | 2017-04-19 09:55:51 -0700 |
commit | c761cec8fa5129fdc8aeeede39623e92d8945439 (patch) | |
tree | 710654bed2b324fbdf87d6d7093a1d7052dff378 /robot/resources | |
parent | 36267295676af437f5328e344aac0a5eaf58c5f5 (diff) |
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 <gary.i.wu@huawei.com>
Diffstat (limited to 'robot/resources')
-rw-r--r-- | robot/resources/openstack/keystone_interface.robot | 1 |
1 files changed, 1 insertions, 0 deletions
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} |