10 Commits

Author SHA1 Message Date
Dean Troyer
89217a6557 Close files on server create, add tests
The files opened for the --files and --user-data options were never
closed, potentially leaking memory in a long-running client. Close
them if they are file objects.

Add a couple of basic tests for server create.

Change-Id: I1658b0caa2d6af17308149cb52196ee28266ddf2
2014-10-14 15:45:20 -05:00
Jenkins
5830007bbc Merge "Fix server resize" 2014-07-12 20:58:37 +00:00
Dean Troyer
ea2ac77a46 Fix server resize
So apparently we've never resized a server???

Fixed command args and add some tests.

Change-Id: I6c3f6fec22390e9d269b7117a42a190d2b4b80ba
2014-07-08 11:20:13 -05:00
Terry Howe
79488377eb Catch SystemExit for parse args
If you have a test with parse args it fails with no error
messages.  This change throws an exception.

Change-Id: I545aba346620a352fe570d394dbd4d6bd2daa995
2014-07-06 10:02:51 -06:00
Dean Troyer
a78d75f290 Fix PEP8 H405 errors
Change-Id: Id9ea03e7d88148f84bffe1b18b5b4315e6123012
2014-06-27 09:12:38 -05:00
Dean Troyer
7a0a7d67ed Prepare for Identity v3 tests
* Split identity/fakes.py for v2_0 and v3
* Split identity/test_identity.py for v2_0 and v3
* Fix issues in commands with enable/disable
* Clean up v2 commands

Change-Id: I6e536b6a130fc556dbd7dcf9f2e76d939ca1bc1c
2013-09-09 14:52:50 -05:00
Dean Troyer
eb405a88c4 Refactor fake data for projects and users
* Move fake data structures into tests/identity/fakes.py
* Use fake clients correctly and support multiple client versions

Change-Id: Icacbb2ca740b63937bd2c4442af61b620638b53e
2013-09-04 14:48:24 -05:00
Dean Troyer
725e2543ef Object API commands using our REST API layer
* 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
2013-08-28 22:16:34 -05:00
Dean Troyer
493339d4da Add Identity v2 project tests
* establish the the form of cliff command classes
* implement some common fake objects
* implement Identity command tests for v2 project
* fix stdout/stderr capture

Also re-work the project create and set commands for exclusive options
(--enable|--disable) to actually behave properly.  Yay tests!

Change-Id: Icbb313db544c1f8dd3c9af7709971838b5a4d115
2013-08-16 14:35:46 -05:00
Monty Taylor
196daf859b Move tests into project package.
There are several reasons for this. One is that the majority of
OpenStack packages behave this way. The second is that it makes writing
software that extends something easier to test (which is a clear usecase
for openstackclient) And third, tests/__init__.py implies a global
package named "tests" - which I'm pretty sure we're not providing.

Change-Id: Ic708ffd92aea78c2ffc1a8579af0587af4fca4ff
2013-06-30 23:30:54 -04:00