Change in vdsm[master]: test jenkins
phoracek at redhat.com
phoracek at redhat.com
Tue Jan 20 11:55:19 UTC 2015
Hello Francesco Romani,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/37123
to review the following change.
Change subject: test jenkins
......................................................................
test jenkins
Change-Id: I7aa17324a2d61f05c285350b50bcb4ecd94673d8
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M tests/clientifTests.py
M tests/vmfakelib.py
2 files changed, 11 insertions(+), 12 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/23/37123/1
diff --git a/tests/clientifTests.py b/tests/clientifTests.py
index 420f70e..50359d6 100644
--- a/tests/clientifTests.py
+++ b/tests/clientifTests.py
@@ -18,13 +18,14 @@
# Refer to the README and COPYING files for full details of the license
#
-import logging
import os.path
from testlib import VdsmTestCase as TestCaseBase
from testlib import temporaryPath
from monkeypatch import MonkeyPatch
from virt.vm import VolumeError
import clientIF
+
+import vmfakelib as fake
INEXISTENT_PATH = '/no/such/path'
@@ -49,13 +50,6 @@
def mkFloppyFs(self, *args, **kwargs):
self.calls.append(('mkFloppyFs', args, kwargs))
return FAKE_FLOPPY_PATH
-
-
-class FakeClientIF(clientIF.clientIF):
- def __init__(self):
- # the bare minimum initialization for our test needs.
- self.irs = None # just to make sure nothing ever happens
- self.log = logging.getLogger('ClientIFTests')
def fakeDrive():
@@ -90,7 +84,7 @@
class ClientIFTests(TestCaseBase):
def setUp(self):
- self.cif = FakeClientIF()
+ self.cif = fake.ClientIF()
def assertCalled(self, funcName):
sv = clientIF.supervdsm.getProxy()
diff --git a/tests/vmfakelib.py b/tests/vmfakelib.py
index 83c5b7a..3e00ec2 100644
--- a/tests/vmfakelib.py
+++ b/tests/vmfakelib.py
@@ -19,8 +19,9 @@
# Refer to the README and COPYING files for full details of the license
#
-import xml.etree.ElementTree as etree
from contextlib import contextmanager
+import logging
+import xml.etree.ElementTree as etree
import libvirt
@@ -28,6 +29,7 @@
from vdsm import libvirtconnection
import caps
+import clientIF
from virt import vm
from testlib import namedTemporaryDir
@@ -45,8 +47,11 @@
return []
-class ClientIF(object):
- def __init__(self, *args, **kwargs):
+class ClientIF(clientIF.clientIF):
+ def __init__(self):
+ # the bare minimum initialization for our test needs.
+ self.irs = None # just to make sure nothing ever happens
+ self.log = logging.getLogger('fake.ClientIF')
self.channelListener = None
self.vmContainer = {}
--
To view, visit http://gerrit.ovirt.org/37123
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7aa17324a2d61f05c285350b50bcb4ecd94673d8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
More information about the vdsm-patches
mailing list