Change in vdsm[master]: rest-api: Add unit tests

agl at us.ibm.com agl at us.ibm.com
Fri Apr 20 18:09:28 UTC 2012


Adam Litke has uploaded a new change for review.

Change subject: rest-api: Add unit tests
......................................................................

rest-api: Add unit tests

Add a framework and unit tests for the REST API.  These tests override the vdsm
API bridge so that the REST code can be tested in isolation.  A functional test
suite that verifies the operation of both the xmlrpc and rest bindings against a
running vdsmd is still needed.

This test module uses some tricky magic to dynamically-generate a fake API.py
that will return pre-programmed return values to the REST API.  Using this
technique, a cherrypy server can be tested with an unmodified Controller.

The following files are created/modified:
 restData.py   - Contains expected data for:
                 Faked API calls, REST requests, REST responses
 restTests.py  - Contains the actual test cases
 testrunner.py - Modified to import some additional needed modules

Signed-off-by: Adam Litke <agl at us.ibm.com>
Change-Id: Ife07553718315136bbb5a74558dd189dee4e475f
---
M tests/Makefile.am
A tests/restData.py
A tests/restTests.py
M tests/testrunner.py
M vdsm/rest/Controller.py
5 files changed, 818 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/57/3757/1
--
To view, visit http://gerrit.ovirt.org/3757
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife07553718315136bbb5a74558dd189dee4e475f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <agl at us.ibm.com>


More information about the vdsm-patches mailing list