Change in vdsm[master]: Refactor VM._guestSockCleanup into utils.rmFileAndLink

fromani at redhat.com fromani at redhat.com
Wed Apr 9 08:16:01 UTC 2014


Francesco Romani has posted comments on this change.

Change subject: Refactor VM._guestSockCleanup into utils.rmFileAndLink
......................................................................


Patch Set 3:

(2 comments)

Good enough for me once existing comments are addressed

http://gerrit.ovirt.org/#/c/26479/3/tests/utilsTests.py
File tests/utilsTests.py:

Line 487: 
Line 488: 
Line 489: class RmFileAndLinkTests(TestCaseBase):
Line 490:     def testFileAndLinkRemoval(self):
Line 491:         with namedTemporaryDir('/tmp') as path:
minor nit: if you don't care where the temporary directory is created, passing an argument here is redundant (and probably this deserves to be documented in namedTemporaryDir)
Line 492:             filePath = os.path.join(path, 'file')
Line 493:             linkPath = os.path.join(path, 'link')
Line 494:             with open(filePath, 'w') as f:
Line 495:                 f.write("test-file")


Line 521:             self.assertFalse(os.path.exists(filePath))
Line 522:             utils.rmFileAndLink(linkPath)
Line 523:             self.assertFalse(os.path.exists(linkPath))
Line 524: 
Line 525:     def testNonExistentPath(self):
nit: please be a bit more explicit about the success conditions of this test (= what is supposed to happen)
Line 526:         with namedTemporaryDir('/tmp') as path:
Line 527:             nonExistentPath = os.path.join(path, 'somefile')


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I749d5e15c91e0046ac700d2eec7220aa7cbd8ac2
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list