Change in vdsm[master]: tests: Add test for mount connection classes
Adam Litke has posted comments on this change. Change subject: tests: Add test for mount connection classes .. Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Ala Hino ah...@redhat.com Gerrit-Reviewer: Allon Mureinik amure...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Freddy Rolland froll...@redhat.com Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add test for mount connection classes
Dan Kenigsberg has submitted this change and it was merged. Change subject: tests: Add test for mount connection classes .. tests: Add test for mount connection classes Add unit tests for MountConnection and GlusterFSConnection classes. Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Signed-off-by: Ala Hino ah...@redhat.com Reviewed-on: https://gerrit.ovirt.org/42307 Reviewed-by: Nir Soffer nsof...@redhat.com Tested-by: Nir Soffer nsof...@redhat.com Reviewed-by: Freddy Rolland froll...@redhat.com Continuous-Integration: Jenkins CI Reviewed-by: Adam Litke ali...@redhat.com --- M tests/storageServerTests.py M vdsm/storage/storageServer.py 2 files changed, 28 insertions(+), 2 deletions(-) Approvals: Adam Litke: Looks good to me, approved Nir Soffer: Verified; Looks good to me, but someone else must approve Jenkins CI: Passed CI tests Freddy Rolland: Looks good to me, but someone else must approve -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Ala Hino ah...@redhat.com Gerrit-Reviewer: Allon Mureinik amure...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Freddy Rolland froll...@redhat.com Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: automat...@ovirt.org ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add test for mount connection classes
automat...@ovirt.org has posted comments on this change. Change subject: tests: Add test for mount connection classes .. Patch Set 5: * Update tracker::IGNORE, no Bug-Url found * Set MODIFIED::IGNORE, no Bug-Url found. -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Ala Hino ah...@redhat.com Gerrit-Reviewer: Allon Mureinik amure...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Freddy Rolland froll...@redhat.com Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add test for mount connection classes
Nir Soffer has posted comments on this change. Change subject: tests: Add test for mount connection classes .. Patch Set 2: (2 comments) Nice! https://gerrit.ovirt.org/#/c/42307/2/tests/storageServerTests.py File tests/storageServerTests.py: Line 18 Line 19 Line 20 Line 21 Line 22 Please sort imports Line 49: Line 50: class MountConnectionTests(VdsmTestCase): Line 51: Line 52: def test_mountpoint(self): Line 53: mountConn = MountConnection(dummy-spec, FakeMount) mountClass is kwarg - it must not be called as positional argument. In this case you are initializing vfsType to FakeMount - this will not do what you want. Should be: mountConn = MountConnection(dummy-spec, mountClass=FakeMount) Also, please use lowercase names (e.g. mountConn - mount_conn). In this context, con is even better. Line 54: self.assertEquals(mountConn._mount.fs_spec, dummy-spec) Line 55: self.assertEquals(mountConn._mount.fs_file, /tmp/dummy-spec) Line 56: Line 57: -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com Gerrit-Reviewer: Ala Hino ah...@redhat.com Gerrit-Reviewer: Allon Mureinik amure...@redhat.com Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add test for mount connection classes
Nir Soffer has posted comments on this change. Change subject: tests: Add test for mount connection classes .. Patch Set 3: Code-Review+1 Verified+1 Perfect. Marking as verified since the tests pass. -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com Gerrit-Reviewer: Ala Hino ah...@redhat.com Gerrit-Reviewer: Allon Mureinik amure...@redhat.com Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add test for mount connection classes
Ala Hino has posted comments on this change. Change subject: tests: Add test for mount connection classes .. Patch Set 2: (2 comments) https://gerrit.ovirt.org/#/c/42307/2/tests/storageServerTests.py File tests/storageServerTests.py: Line 18 Line 19 Line 20 Line 21 Line 22 Please sort imports Done Line 49: Line 50: class MountConnectionTests(VdsmTestCase): Line 51: Line 52: def test_mountpoint(self): Line 53: mountConn = MountConnection(dummy-spec, FakeMount) mountClass is kwarg - it must not be called as positional argument. Done Line 54: self.assertEquals(mountConn._mount.fs_spec, dummy-spec) Line 55: self.assertEquals(mountConn._mount.fs_file, /tmp/dummy-spec) Line 56: Line 57: -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com Gerrit-Reviewer: Ala Hino ah...@redhat.com Gerrit-Reviewer: Allon Mureinik amure...@redhat.com Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add test for mount connection classes
automat...@ovirt.org has posted comments on this change. Change subject: tests: Add test for mount connection classes .. Patch Set 3: * Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com Gerrit-Reviewer: Ala Hino ah...@redhat.com Gerrit-Reviewer: Allon Mureinik amure...@redhat.com Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add test for mount connection classes
Nir Soffer has posted comments on this change. Change subject: tests: Add test for mount connection classes .. Patch Set 2: Please rebase on master - you are working on stale code. -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com Gerrit-Reviewer: Ala Hino ah...@redhat.com Gerrit-Reviewer: Allon Mureinik amure...@redhat.com Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add test for mount connection classes
Freddy Rolland has posted comments on this change. Change subject: tests: Add test for mount connection classes .. Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Ala Hino ah...@redhat.com Gerrit-Reviewer: Allon Mureinik amure...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Freddy Rolland froll...@redhat.com Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add test for mount connection classes
Nir Soffer has posted comments on this change. Change subject: tests: Add test for mount connection classes .. Patch Set 3: Needs rebase -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Ala Hino ah...@redhat.com Gerrit-Reviewer: Allon Mureinik amure...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Freddy Rolland froll...@redhat.com Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add test for mount connection classes
Ala Hino has posted comments on this change. Change subject: tests: Add test for mount connection classes .. Patch Set 1: (5 comments) https://gerrit.ovirt.org/#/c/42307/1/tests/storageServerTests.py File tests/storageServerTests.py: Line 26: Line 27: class FakeMount(object): Line 28: def __init__(self, fs_spec, fs_file): Line 29: self._fs_spec = fs_spec Line 30: self._fs_file = fs_file use public names, we want to implement the test by comparing these. Done Line 31: Line 32: Line 33: class IscsiConnectionMismatchTests(VdsmTestCase): Line 34: Line 48: Line 49: Line 50: class MountConnectionTests(VdsmTestCase): Line 51: Line 52: def testLocalPathBase(self): This does not test localPathBase, but the mountpoint. Done Line 53: mountConn = MountConnection(, FakeMount) Line 54: self.assertEquals(mountConn._getLocalPath(), /tmp/) Line 55: Line 56: Line 49: Line 50: class MountConnectionTests(VdsmTestCase): Line 51: Line 52: def testLocalPathBase(self): Line 53: mountConn = MountConnection(, FakeMount) You have to modify MountConnection so it accepts a mountClass argument. Done Line 54: self.assertEquals(mountConn._getLocalPath(), /tmp/) Line 55: Line 56: Line 57: class GlusterFSConnectionTests(VdsmTestCase): Line 50: class MountConnectionTests(VdsmTestCase): Line 51: Line 52: def testLocalPathBase(self): Line 53: mountConn = MountConnection(, FakeMount) Line 54: self.assertEquals(mountConn._getLocalPath(), /tmp/) If you test _getLocalPath(), why do you need the FakeMount class? Done Line 55: Line 56: Line 57: class GlusterFSConnectionTests(VdsmTestCase): Line 58: Line 58: Line 59: def testLocalPathBase(self): Line 60: mountConn = GlusterFSConnection(server:/volume, FakeMount) Line 61: self.assertEquals(mountConn._getLocalPath(), Line 62: /tmp/glusterSD/server:_volume) Same as above. Done -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com Gerrit-Reviewer: Ala Hino ah...@redhat.com Gerrit-Reviewer: Allon Mureinik amure...@redhat.com Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add test for mount connection classes
automat...@ovirt.org has posted comments on this change. Change subject: tests: Add test for mount connection classes .. Patch Set 2: * Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com Gerrit-Reviewer: Allon Mureinik amure...@redhat.com Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add test for mount connection classes
automat...@ovirt.org has posted comments on this change. Change subject: tests: Add test for mount connection classes .. Patch Set 4: * Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Ala Hino ah...@redhat.com Gerrit-Reviewer: Allon Mureinik amure...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Freddy Rolland froll...@redhat.com Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add test for mount connection classes
Ala Hino has uploaded a new change for review. Change subject: tests: Add test for mount connection classes .. tests: Add test for mount connection classes Add unit tests for MountConnection and GlusterFSConnection classes. Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Signed-off-by: Ala Hino ah...@redhat.com --- M tests/storageServerTests.py 1 file changed, 23 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/42307/1 diff --git a/tests/storageServerTests.py b/tests/storageServerTests.py index 6703466..05e5940 100644 --- a/tests/storageServerTests.py +++ b/tests/storageServerTests.py @@ -19,7 +19,15 @@ # from testlib import VdsmTestCase +from storage.storageServer import GlusterFSConnection +from storage.storageServer import MountConnection from storage.storageServer import IscsiConnection + + +class FakeMount(object): +def __init__(self, fs_spec, fs_file): +self._fs_spec = fs_spec +self._fs_file = fs_file class IscsiConnectionMismatchTests(VdsmTestCase): @@ -37,3 +45,18 @@ IscsiConnection.Mismatch(error 2)] expected = %s % [error 1, error 2] self.assertEqual(str(errors), expected) + + +class MountConnectionTests(VdsmTestCase): + +def testLocalPathBase(self): +mountConn = MountConnection(, FakeMount) +self.assertEquals(mountConn._getLocalPath(), /tmp/) + + +class GlusterFSConnectionTests(VdsmTestCase): + +def testLocalPathBase(self): +mountConn = GlusterFSConnection(server:/volume, FakeMount) +self.assertEquals(mountConn._getLocalPath(), + /tmp/glusterSD/server:_volume) -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add test for mount connection classes
automat...@ovirt.org has posted comments on this change. Change subject: tests: Add test for mount connection classes .. Patch Set 1: * Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add test for mount connection classes
Nir Soffer has posted comments on this change. Change subject: tests: Add test for mount connection classes .. Patch Set 1: (5 comments) https://gerrit.ovirt.org/#/c/42307/1/tests/storageServerTests.py File tests/storageServerTests.py: Line 26: Line 27: class FakeMount(object): Line 28: def __init__(self, fs_spec, fs_file): Line 29: self._fs_spec = fs_spec Line 30: self._fs_file = fs_file use public names, we want to implement the test by comparing these. Line 31: Line 32: Line 33: class IscsiConnectionMismatchTests(VdsmTestCase): Line 34: Line 48: Line 49: Line 50: class MountConnectionTests(VdsmTestCase): Line 51: Line 52: def testLocalPathBase(self): This does not test localPathBase, but the mountpoint. Rename to test_mountpoint() Line 53: mountConn = MountConnection(, FakeMount) Line 54: self.assertEquals(mountConn._getLocalPath(), /tmp/) Line 55: Line 56: Line 49: Line 50: class MountConnectionTests(VdsmTestCase): Line 51: Line 52: def testLocalPathBase(self): Line 53: mountConn = MountConnection(, FakeMount) You have to modify MountConnection so it accepts a mountClass argument. Line 54: self.assertEquals(mountConn._getLocalPath(), /tmp/) Line 55: Line 56: Line 57: class GlusterFSConnectionTests(VdsmTestCase): Line 50: class MountConnectionTests(VdsmTestCase): Line 51: Line 52: def testLocalPathBase(self): Line 53: mountConn = MountConnection(, FakeMount) Line 54: self.assertEquals(mountConn._getLocalPath(), /tmp/) If you test _getLocalPath(), why do you need the FakeMount class? You have two options: - Add mountpoint property, replacing _getLocalPath() - this is needed anyway in other place in the code. Then test conn.mountpoint. In this case, there is not need for FakeMount - Modify MountConnection so you can override the Mount class. In this case, you can test that the mount object has the expected fs_spec and fs_file This is also good idea because then we can easily test without doing real mounts, or simulate errors which are impossible or very hard to simulate with real mount. Line 55: Line 56: Line 57: class GlusterFSConnectionTests(VdsmTestCase): Line 58: Line 58: Line 59: def testLocalPathBase(self): Line 60: mountConn = GlusterFSConnection(server:/volume, FakeMount) Line 61: self.assertEquals(mountConn._getLocalPath(), Line 62: /tmp/glusterSD/server:_volume) Same as above. -- To view, visit https://gerrit.ovirt.org/42307 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28e0b12eaab80dc274ad3c35f79c2897f4dae44a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ah...@redhat.com Gerrit-Reviewer: Allon Mureinik amure...@redhat.com Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches