Change in vdsm[master]: trival change for skip mom test logic

lvroyce at linux.vnet.ibm.com lvroyce at linux.vnet.ibm.com
Wed Mar 13 05:59:51 UTC 2013


Royce Lv has posted comments on this change.

Change subject: trival change for skip mom test logic
......................................................................


Patch Set 2: (3 inline comments)

....................................................
File tests/functional/momTests.py
Line 25: from testrunner import VdsmTestCase as TestCaseBase
Line 26: from nose.plugins.skip import SkipTest
Line 27: from vdsm import vdscli
Line 28: 
Line 29: 
I'd like to depend on vdsm function if we had this exposed
Line 30: def skipNoMOM(method):
Line 31:     @wraps(method)
Line 32:     def wrapped(self, *args, **kwargs):
Line 33:         r = self.s.getVdsCapabilities()


Line 31:     @wraps(method)
Line 32:     def wrapped(self, *args, **kwargs):
Line 33:         r = self.s.getVdsCapabilities()
Line 34:         self.assertEquals(r['status']['code'], 0)
Line 35:         if not r['info']['packages2'].get('mom'):
This depends on implementation of getVdsCaps(). Also functional test are just assumed to run when we installed all vdsm env, vdsm+mom.
Line 36:             raise SkipTest('MOM is not installed')
Line 37:         return method(self, *args, **kwargs)
Line 38:     return wrapped
Line 39: 


Line 42:     def setUp(self):
Line 43:         self.s = vdscli.connect()
Line 44: 
Line 45:     @skipNoMOM
Line 46:     @testValidation.ValidateRunningAsRoot
Done
Line 47:     def testKSM(self):
Line 48:         run = 1
Line 49:         pages_to_scan = random.randint(100, 200)
Line 50: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iee2adb63d61f708d74ef84ee68f220994247eea3
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Mei Liu <liumbj at linux.vnet.ibm.com>
Gerrit-Reviewer: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list