Made changes in files using content_find method
Depends on D1288
Differential D1420
Made changes to adapt it to new content_find return type faux on Apr 16 2019, 2:27 PM. Authored by
Details
Made changes in files using content_find method Depends on D1288
Diff Detail
Event TimelineThere are a very large number of changes, so older changes are hidden. Show Older Changes Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/390/
Comment Actions I am getting an error when adding the test so I thought it would be better to get a review. Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/409/ Comment Actions Have added the test for you to check if I am going in the correct direction. Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/410/ Comment Actions So basically if we want to raise notfoundexc by content_find we have to give Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/435/ Comment Actions
Yes, look how test_lookup_directory_with_revision_with_path does it Comment Actions Er, you already did that, and it indeed raises an exception, look at Jenkins' logs: You can reproduce this example by temporarily adding @reproduce_failure('4.23.4', b'AXicY2TAD5iwiDESqQ5FDwAB3AAI') as a decorator on your test case Falsifying example: test_lookup_directory_with_revision_unknown_content(self=<swh.web.tests.common.test_service.ServiceTestCase testMethod=test_lookup_directory_with_revision_unknown_content>, revision='500a697730a27eabdcdf8af4aa6137819e72f171', unknown_content={'blake2S256': '0000000000000000000000000000000000000000000000000000000000000002', 'sha1': '0000000000000000000000000000000000000001', 'sha1_git': '0000000000000000000000000000000000000002', 'sha256': '0000000000000000000000000000000000000000000000000000000000000001'}) Traceback (most recent call last): File "/home/jenkins/workspace/DWAPPS/tox/.tox/py3/lib/python3.5/site-packages/swh/web/tests/common/test_service.py", line 359, in test_lookup_directory_with_revision_unknown_content cm.exception.args[0]) File "/usr/lib/python3.5/unittest/case.py", line 1080, in assertIn self.fail(self._formatMessage(msg, standardMsg)) File "/usr/lib/python3.5/unittest/case.py", line 666, in fail raise self.failureException(msg) AssertionError: 'Content not found for 500a697730a27eabdcdf8af4aa6137819e72f171' not found in "Directory or File 'README.md' pointed to by revision 500a697730a27eabdcdf8af4aa6137819e72f171 not found" The only issue here is that your assertion does not match the error message Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/436/
Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/437/ Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/439/ Comment Actions lgtm. @anlambert Do you want to have a look?
Comment Actions @faux, I am fine with the updated service module implementation and the tests pass so this looks good to me. Nevertheless, I pointed out numerous code formatting issues that you must addressed first. Also please rebase to origin/master before updating that diff.
Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/440/ Comment Actions Apart a couple of small fixes, that diff can be accepted as is. Nevertheless, let's wait for the landing of D1288 before merging this.
Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/441/ Comment Actions Build is green Comment Actions Build is green |