Tasks #4560
closed
- Description updated (diff)
(05:29:28 PM) loicd: sjust: Hi ! I see you authored a many commits from https://github.com/ceph/ceph/blob/master/src/os/LFNIndex.cc . Would you have an advice regarding unit tests ? It is fine if you don't I'll just go ahead and write them ;-)
(05:43:35 PM) sjust: loicd: the pure functions in LFNIndex.h are good candiates for unit testing
(05:43:54 PM) sjust: unfortunately, that's mostly just the methods in the manglers/demanglers section
(05:43:56 PM) sjust: *section
(05:44:02 PM) sjust: at the bottom
(05:44:08 PM) sjust: the rest are thin wrappers over IO
(05:45:04 PM) ***loicd looking
(05:45:24 PM) sjust: lfn_get_name along with lfn_unlink are the least trivial pieces of machinery
(05:45:49 PM) sjust: and I don't think they have explicit test coverage
(05:47:09 PM) loicd: I'll start with them. It's a little tricky because they are private.
(05:48:15 PM) sjust: loicd: urgh, would prefer they not be public, but there's probably no real harm
(05:48:32 PM) sjust: ideally, you could make a public debug_runtests() method
(05:48:41 PM) sjust: not sure
(05:49:25 PM) sjust: test/filestore/store_test.cc has some testing for the collection index machinery
(05:49:31 PM) loicd: I'll try to do with the protected/public methods. If I'm stuck I'll figure out a minimal way to create the conditions for a good unit test.
(05:49:38 PM) sjust: though I wouldn't classify it as a unit test
- % Done changed from 0 to 10
- % Done changed from 10 to 20
- Status changed from In Progress to Closed
- % Done changed from 20 to 100
There is still more work to be done but another ticket can be re-opened if someone wants to work on it.
Also available in: Atom
PDF