Yaniv Bronhaim has posted comments on this change.

Change subject: schema: verification of API.py and schema during UT
......................................................................


Patch Set 10:

(4 comments)

http://gerrit.ovirt.org/#/c/35557/10/tests/bridgeTests.py
File tests/bridgeTests.py:

Line 37: class Host():
Line 38:     ctorArgs = []
Line 39: 
Line 40:     def fenceNode(self, addr, port, agent, username, password, action,
Line 41:                   secure=False, options='', policy=None):
is this change related?
Line 42:         if options == 'port=15':
Line 43:             return {'status': {'code': 0, 'message': 'Done'},
Line 44:                     'power': 'on'}
Line 45:         else:


http://gerrit.ovirt.org/#/c/35557/10/tests/schemaValidationTest.py
File tests/schemaValidationTest.py:

Line 19: #
Line 20: import inspect
Line 21: 
Line 22: import API
Line 23: import gluster.apiwrapper as gapi
> The idea is to run this code as UT during the build process. We want to val
on rhev_build (http://gerrit.ovirt.org/#/c/35722/9/vdsm.spec.in,cm) we won't 
have gluster.. so i guess it will break the test, even-though we might not run 
the nosetests I think it should check the availability of gluster packages, if 
not exist maybe report, but don't count on it.
Line 24: 
Line 25: from rpc import Bridge
Line 26: from testlib import VdsmTestCase as TestCaseBase
Line 27: 


Line 34: 
Line 35:     def test_verify_schema(self):
Line 36:         # add gluster validation
Line 37:         apiobj = self._get_api('API')
Line 38:         self._validate(apiobj)
so you don't check gluster api at all iiuc..
Line 39: 
Line 40:     def _validate(self, api_mod):
Line 41:         bridge = Bridge.DynamicBridge()
Line 42: 


Line 126:     def _prep_msg(self, class_name, method_name, method_args, args):
Line 127:         return '%s.%s has different args: %s, %s' % (class_name, 
method_name,
Line 128:                                                      method_args, 
args)
Line 129: 
Line 130:     def _get_api(self, selector):
> The idea is to pass selector to get API object. When validating you can ask
i understand. but at least restrict the return value. "else gapi" ? else should 
be none, and elif can check for "gapi" or whatever you would expect ..
Line 131:         if (selector == 'API'):
Line 132:             return API
Line 133:         else:


-- 
To view, visit http://gerrit.ovirt.org/35557
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If81cff3c988e00c8c4eda1809f481e1ae19398dd
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to