Dan Kenigsberg has submitted this change and it was merged.
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 <[email protected]>
Change-Id: Ife07553718315136bbb5a74558dd189dee4e475f
---
M Makefile.am
M tests/Makefile.am
A tests/restData.py
A tests/restTests.py
4 files changed, 830 insertions(+), 2 deletions(-)
Approvals:
Dan Kenigsberg: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/3757
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ife07553718315136bbb5a74558dd189dee4e475f
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: ShaoHe Feng <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/vdsm-patches