Change in vdsm[master]: tests: improve miscTests::ReadSpeed
nsoffer at redhat.com
nsoffer at redhat.com
Thu Apr 14 15:53:01 UTC 2016
Nir Soffer has posted comments on this change.
Change subject: tests: improve miscTests::ReadSpeed
......................................................................
Patch Set 1:
(1 comment)
This better than the old tests, but the function and the tests are going to be removed, so there is no point in this change. I would just add the missing tests.
https://gerrit.ovirt.org/#/c/56159/1/tests/miscTests.py
File tests/miscTests.py:
Line 879: with MonkeyPatchScope([(misc, 'execCmd', _fake_exec_cmd)]):
Line 880: speed = misc.readspeed('useless')
Line 881:
Line 882: self.assertEquals(speed["bytes"], int(bytes_read))
Line 883: self.assertAlmostEqual(speed["seconds"], float(seconds))
misc.readspeed is about to die soon, replaced by storage.check.CheckResult, which is much easier to test, so I don't think we should invest in improving these tests by mocking execCmd. The best way to test this is to test only the parsing, as done in storage_check_test.py.
See https://gerrit.ovirt.org/#/c/54757/34/tests/storage_check_test.py
Line 884:
Line 885:
Line 886: class PidExists(TestCaseBase):
Line 887:
--
To view, visit https://gerrit.ovirt.org/56159
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I5aef61848b0d237c2250fd8b8e6b4ee9ee88e299
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list