Assaf Muller has uploaded a new change for review. Change subject: I ran into a problem when running 'make rpm' in Fedora 18 *without* root access. The ConfigWriterTests:testPersistantBackup fails, because it uses libvirt's createNetwork and removeNetwork functions, but libvirt requires root access. The current solution ......................................................................
I ran into a problem when running 'make rpm' in Fedora 18 *without* root access. The ConfigWriterTests:testPersistantBackup fails, because it uses libvirt's createNetwork and removeNetwork functions, but libvirt requires root access. The current solution is to use monkey patch, and simply nullify the create and remove network functions. The test now passes, but this might not be the ideal solution to the problem. Signed-off-by: Assaf Muller <[email protected]> Change-Id: Ic2e0076e146c57228eee3cca8b57948fb82bcbb7 --- M tests/configNetworkTests.py 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/11545/1 diff --git a/tests/configNetworkTests.py b/tests/configNetworkTests.py index 0a129b9..722db6c 100644 --- a/tests/configNetworkTests.py +++ b/tests/configNetworkTests.py @@ -28,7 +28,7 @@ import pwd import configNetwork -from vdsm import netinfo +from vdsm import netinfo, libvirtconnection from vdsm.utils import memoized from testrunner import VdsmTestCase as TestCaseBase @@ -325,6 +325,8 @@ os.path.join(self._tempdir, 'ifcfg-')), (configNetwork, 'ifdown', lambda x: 0), (configNetwork, 'ifup', lambda *x: 0), + (configNetwork.ConfigWriter, '_createNetwork', lambda *x: None), + (configNetwork.ConfigWriter, '_removeNetwork', lambda *x: None), ]): #after vdsm package is installed, the 'vdsm' account will be #created if no 'vdsm' account, we should skip this test -- To view, visit http://gerrit.ovirt.org/11545 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic2e0076e146c57228eee3cca8b57948fb82bcbb7 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
