summaryrefslogtreecommitdiff
path: root/cinderclient/tests/unit/test_http.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix test_auth_with_keystone_v3 testGorka Eguileor2017-01-251-1/+7
| | | | | | | | | | | | | | | | Test is subject to spurious errors due to an incorrect data check. The check is assuming that a call to json.dumps with different dicts will always generate the same string, which is incorrect. This patch tests the JSON data that is sent in the request on its own based on converting the passed JSON string to a dict and comparing expected and actual dicts instead of strings. TrivialFix Closes-Bug: #1658704 Change-Id: I386cfee2e2c1dc2971d8a760b485505a90f6f120
* Support Keystone V3 with HttpClientwangxiyuan2016-12-241-0/+48
| | | | | | | | The http way doesn't work with keystone v3. This patch update the HttpClient to support it. Closes-bug: #1546280 Change-Id: Iefa1aafb796609aca076ed6ab73d02c92b9198d0
* Switch to keystoneauthSteve Martinelli2016-07-231-20/+8
| | | | | | | | | | | move cinderclient to keystoneauth as keystoneclient's auth session, plugins and adapter code has been deprecated. Co-Authored-By: Paulo Ewerton <pauloewerton@lsd.ufcg.edu.br> Co-Authored-By: Sean McGinnis <sean.mcginnis@gmail.com> Co-Authored-By: Jamie Lennox <jamielennox@gmail.com> Change-Id: Id4bf0e2088e8ad99e83cd4f9b8549c2aca1f65a2
* Cinder client should retry with Retry-After valueYuriy Nesenenko2016-07-061-0/+43
| | | | | | | | | | | | | | | | | | | If a request fails but the response contains a "Retry-After", the cinder client should wait the amount of time and then retry. Cinder client should report a warning to user and continue with retry, so that user can cancel the operation if not interested in retry. The value in "Retry-After" header will be in seconds or GMT value, client should handle both the cases. How many times client should retry will be controlled by user through "--retries" argument to cinder api example, $ cinder --retries 3 availability-zone-list If request was not sucessful within the retries, client should raise the exception. Change-Id: I99af957bfbbe3a202b148dc2fcafdd20b5d7cda0 Partial-Bug: #1263069
* Fix argument order for assertEqual to (expected, observed)reedip2016-06-141-2/+2
| | | | | | | | | | | | assertEqual expects that the arguments provided to it should be (expected, observed). If a particluar order is kept as a convention, then it helps to provide a cleaner message to the developer if Unit Tests fail. The following patch fixes this issue. TrivialFix Change-Id: I817a654733e0f3886ca85778a49aa579592f60ff Closes-Bug: #1259292
* Move unit tests into test directoryJohn Griffith2015-03-231-0/+280
This is the first step of moving functional testing into the project tree. This change just moves all of the unit tests to be under a dedicated tests/unit directory. Follow up patches will add the functional directory and start moving tempest CLI tests there. Change-Id: I9dc0b8f761676c1b3bbdeb03e2f44b35f75c693e