summaryrefslogtreecommitdiff
path: root/openstackclient/tests/object
Commit message (Collapse)AuthorAgeFilesLines
* Standardize import formatshizhihui2016-07-221-0/+1
| | | | | | | | According to the rule in http://docs.openstack.org/developer/hacking/#imports I modify some irregular import format. Change-Id: Ibf29ccaf3ddec4a956334cc3368ebee7a66e282c
* Fixed a bunch of spacingBrandon Palm2016-02-234-0/+4
| | | | | | | Nothing too complicated here. I fixed a bunch of spacing issues that I saw in OSC. Change-Id: I935ab48e7c5bac5f88ecdb3a05f73fb44fc9f41d
* Use assertIsNone() instead of assertEqual(None, xxx)Tang Chen2016-02-191-3/+3
| | | | Change-Id: Ibbd7d6d27b2ff20304e3121fbadd5d50c1836d9b
* Fix DisplayCommandBase comments for cliff ShowOne subclass testsTang Chen2016-02-104-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As bug #1477199 describes, the wrong comment below is all over the unit test code of OSC. # DisplayCommandBase.take_action() returns two tuples There is no such class named DisplayCommandBase in OSC. It is in cliff. All OSC command classes inherit from the base classes in cliff, class Command, class Lister and class ShowOne. It is like this: Object |--> Command |--> DisplayCommandBase |--> Lister |--> ShowOne take_action() is an abstract method of class Command, and generally is overwritten by subclasses. * Command.take_action() returns nothing. * Lister.take_action() returns a tuple which contains a tuple of columns and a generator used to generate the data. * ShowOne.take_action() returns an iterator which contains a tuple of columns and a tuple of data. So, this problem should be fixed in 3 steps: 1. Remove all DisplayCommandBase comments for tests of classes inheriting from class Command in cliff as it returns nothing. 2. Fix all DisplayCommandBase comments for tests of classes inheriting from class Lister in cliff. Lister.take_action() returns a tuple and a generator. 3. Fix all DisplayCommandBase comments for tests of classes inheriting from class ShowOne in cliff. ShowOne.take_action() returns two tuples. This patch finishes step 3 in all but identity tests. There are too many such comments in identity tests. So fix them all in another patch. Change-Id: I1afe4852069d25d562a9448ec2bf2cff58955052 Partial-bug: #1477199
* Fix DisplayCommandBase comments for cliff Lister subclass testsTang Chen2016-02-093-15/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As bug #1477199 describes, the wrong comment below is all over the unit test code of OSC. # DisplayCommandBase.take_action() returns two tuples There is no such class named DisplayCommandBase in OSC. It is in cliff. All OSC command classes inherit from the base classes in cliff, class Command, class Lister and class ShowOne. It is like this: Object |--> Command |--> DisplayCommandBase |--> Lister |--> ShowOne take_action() is an abstract method of class Command, and generally is overwritten by subclasses. * Command.take_action() returns nothing. * Lister.take_action() returns a tuple which contains a tuple of columns and a generator used to generate the data. * ShowOne.take_action() returns an iterator which contains a tuple of columns and a tuple of data. So, this problem should be fixed in 3 steps: 1. Remove all DisplayCommandBase comments for tests of classes inheriting from class Command in cliff as it returns nothing. 2. Fix all DisplayCommandBase comments for tests of classes inheriting from class Lister in cliff. Lister.take_action() returns a tuple and a generator. 3. Fix all DisplayCommandBase comments for tests of classes inheriting from class ShowOne in cliff. ShowOne.take_action() returns two tuples. This patch finishes step 2 in all but identity tests. There are too many such comments in identity tests. So fix them all in another patch. Change-Id: I00f38d12f55abe20fa708f6349073da658622f8d Partial-bug: #1477199
* Add recursive object delete for containersTerryHowe2016-02-051-0/+90
| | | | Change-Id: Ib291e79864c218464e842a08efd3742193ba5ff0
* Refactor abstract columns and datalist out in image and objectSaiKiran2016-01-234-56/+43
| | | | | | | | | | | test cases columns and datalist has been set in each test case in image and object which is not necessary. This patch abstract it out and remove all redundant code. Change-Id: Ie6aa3fa27ab2a468c67da31209107517259631c2 Related-Bug: 1532384
* Merge "Move session and fixtures to keystoneauth1"Jenkins2015-10-201-1/+1
|\
| * Move session and fixtures to keystoneauth1Steve Martinelli2015-10-141-1/+1
| | | | | | | | | | | | | | | | in an effort to start consuming keystoneauth1, we can move our sesssion and fixture code over to use keystoneauth1 instead of keystoneclient. Change-Id: Ibcbd588ce2e3d864f87ff1eb6e1c3c071a1e06f6
* | Fix up object-store show commandsSteve Martinelli2015-10-102-5/+0
|/ | | | | | | | | | | | | | | | 1) Change metadata to appear under a common 'properties' key, and use the utility to format them, this applied to object, account and container. 2) Clean up container and object output, which were setting the x-container-meta-owner property, but this is metadata only for the container, so it's pointless to have, removed it. 3) Container show was showing read/write ACLs and sync stuff, but these are not being returned by my swift by default, so I moved these to be checks, so we don't clutter the output. Change-Id: Ife7521fe9c2724035b06963c118bd6016ba2f5b5
* cleanup account ids from container commandsSteve Martinelli2015-10-022-0/+4
| | | | | | | use a common function to determine account ID instead of different ways - depending on the response and command Change-Id: I95adc5dc7d5a82a2cffc570d1ded24d1fc754a11
* fix the wrong order of assertEqual argswanghong2015-01-271-2/+2
| | | | | | Let's fix them thoroughly. Change-Id: I8a1f042fb614b05c9836a49041f3883638b870b0
* Beef up object-store testsDean Troyer2014-10-225-58/+228
| | | | | | | | * Add object top-to-bottom tests * Move some fakes around * Clean up existing object tests Change-Id: If8406da611c11bbd2b1bf5153e45b720b0eea442
* Move object-store commands to low-level APIDean Troyer2014-10-016-612/+36
| | | | | | | | api.object_store.APIv1 now contains the formerly top-level functions implementing the object-store REST client. This replaces the old-style ObjectClientv1 that is no longer necessary. Change-Id: I7d8fea326b214481e7d6b24119bd41777c6aa968
* Test top-to-bottom: object-store containersDean Troyer2014-09-292-7/+345
| | | | | | | | | | Replicate the object-store container command tests but use requests_mock to test the entire stack down to the requests module. These will be useful regressions tests when the existing object-store lib modules are moved to the low-level API object. Change-Id: Ibf25be46156eb1009f1b66f02f2073d3913b846d
* Change app.restapi to app.client_manager.sessionDean Troyer2014-08-254-102/+107
| | | | | | | | | | | This is step 1 toward using Keystone client's session.Session as the primary session/requests interface in OSC. * Move the session create into ClientManager and rename 'restapi' attribute to 'session' * Set up ClientManager and session loggers * Fix container and object command references to restapi/api Change-Id: I013d81520b336c7a6422cd22c05d1d65655e64f8
* Remove copyright from empty filesAlexander Ignatov2014-01-203-36/+0
| | | | | | | | | According to policy change in HACKING: http://docs.openstack.org/developer/hacking/#openstack-licensing empty files should no longer contain copyright notices. Change-Id: Iba09a00f24dfbd1cd03c1c9f70ea216788e64d93 Closes-Bug: #1262424
* Bring RESTApi closer to ithe imminent keystoneclient.SessionDean Troyer2013-12-032-77/+110
| | | | | | | Prepare to use the (soon to be) common Session from keystoneclient * Rework RESTApi to eventually be a subclass of keystoneclient.Session Change-Id: I68e610f8b19a3f6267a93f7bf3de54a228be68aa
* Restore Object API name 'object-store'Dean Troyer2013-11-253-5/+17
| | | | | | It's used in the service catalog, doh! Change-Id: If8f6db49c84756fd8e58cc68910160da4cd99b5d
* Expand support for command extensionsDean Troyer2013-11-215-55/+43
| | | | | | | | | | | | Allows client libraries to have complete access to the rest of the OSC ClientManager. In addition, extension libraries can define global options (for API version options/env vars) and define versioned API entry points similar to the in-repo commands. The changes to ClientManager exposed some issues in the existing object api tests that needed to be cleaned up. Change-Id: Ic9662edf34c5dd130a2f1a69d2454adefc1f8a95
* Complete basic test infrastructureDean Troyer2013-11-183-2/+2
| | | | | | | This finally gets all of the API tests into a common framework regarding test classes and so forth. Change-Id: If675347129c50dcba0bfc5b6c58f5a2ca57ff46c
* Add object-store show commandsDean Troyer2013-09-264-16/+217
| | | | | | | * Add lib.container.show_container() and lib.object.show_object() * Add container and object show commands Change-Id: I963d664c55b59739453345f0f353aa2eaf1bf70e
* Refactor fake data for projects and usersDean Troyer2013-09-042-0/+4
| | | | | | | * Move fake data structures into tests/identity/fakes.py * Use fake clients correctly and support multiple client versions Change-Id: Icacbb2ca740b63937bd2c4442af61b620638b53e
* Object API commands using our REST API layerDean Troyer2013-08-288-0/+1142
* Add object-store API to ClientManager * Add object-store client * Add Object API library in openstackclient.object.v1.lib * Add Object API {container,object} list commands * Add library tests * Add command tests This should complete the Object v1 container and object list commands Change-Id: Ib1770d45efa8871959826b85faafa1e0bcef0a03