Details
- Reviewers
douardda - Group Reviewers
Reviewers - Commits
- rDSTOC168ebf9a624c: Add test for content_get_range's boundaries.
rDSTO168ebf9a624c: Add test for content_get_range's boundaries.
Diff Detail
- Repository
- rDSTO Storage manager
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Build is green
See https://jenkins.softwareheritage.org/job/DSTO/job/tox/444/ for more details.
swh/storage/tests/test_storage.py | ||
---|---|---|
3842 | probably a stupid question but why do we expect 3 here (instead of 4)? |
swh/storage/tests/test_storage.py | ||
---|---|---|
3842 | Because we're getting contents in range get_sha1s[1] to get_sha1s[-1] inclusive, so that's all the contents (4) minus the first one. |
swh/storage/tests/test_storage.py | ||
---|---|---|
3842 | oh yes indeed. Wouldn't it be useful (?) to raise the max_size and check the content_get_range against all situations wrt range limits: the beginning, middle and end of the range (like range(0, 2), range(n, n+2) and range(-3, -1) )? |
swh/storage/tests/test_storage.py | ||
---|---|---|
3842 | That's what the three tests are for (test_generate_content_get_range_start, test_generate_content_get_range_end, test_origin_get_range). I did not want to do a single test for all of them, because it means writing the same logic in the test as in the real code, so testing makes less sense |
swh/storage/tests/test_storage.py | ||
---|---|---|
3842 | Oh you mean I must read the whole diff when I review it? what a bama. So now, why does the range_start test uses sha1[1] as start value? |
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tox/486/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tox/486/console
Build is green
See https://jenkins.softwareheritage.org/job/DSTO/job/tox/511/ for more details.
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tox/523/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tox/523/console