search.journal_client: Actually filter on full origin_visit_status
Closed
requested to merge generated-differential-D4749-source into generated-differential-D4749-target
I think something went badly in some old rebase I did because I thought that was already the case.
Or I may conflate with the other indexer journal client... [1]
- [1] https://forge.softwareheritage.org/source/swh-indexer/browse/master/swh/indexer/journal_client.py$25
Test Plan
tox
Migrated from D4749 (view on Phabricator)
Merge request reports
Activity
Filter activity
Build is green
Patch application report for D4749 (id=16817)
Rebasing onto b47bea25...
Current branch diff-target is up to date.
Changes applied before test
commit 94c38bf61d878d618caf298f89886845baa52ff2 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Tue Dec 15 21:12:38 2020 +0100 search.journal_client: Actually filter on full origin_visit_status
See https://jenkins.softwareheritage.org/job/DSEA/job/tests-on-diff/62/ for more details.
Here is a test:
def test_journal_client_origin_visit_status_from_journal(): search_mock = MagicMock() worker_fn = functools.partial(process_journal_objects, search=search_mock,) worker_fn({"origin_visit_status": [{"origin": {"url": "http://foobar.baz"}, "status": "full"}]}) search_mock.origin_update.assert_called_once_with( [{"url": "http://foobar.baz", "has_visits": True},] ) search_mock.reset_mock() worker_fn({"origin_visit_status": [{"origin": {"url": "http://foobar.baz"}, "status": "partial"}]}) search_mock.origin_update.assert_not_called()
Build has FAILED
Patch application report for D4749 (id=16839)
Rebasing onto b47bea25...
Current branch diff-target is up to date.
Changes applied before test
commit 20a9d2e349b99bfb8a3d1c80f6ad1a9729b49cc9 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Tue Dec 15 21:12:38 2020 +0100 search.journal_client: Actually filter on full origin_visit_status
Link to build: https://jenkins.softwareheritage.org/job/DSEA/job/tests-on-diff/63/ See console output for more information: https://jenkins.softwareheritage.org/job/DSEA/job/tests-on-diff/63/console
Build is green
Patch application report for D4749 (id=16845)
Rebasing onto b47bea25...
Current branch diff-target is up to date.
Changes applied before test
commit c3758cf6120fa832455e3d9955720c6be2c89537 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Tue Dec 15 21:12:38 2020 +0100 search.journal_client: Actually filter on full origin_visit_status
See https://jenkins.softwareheritage.org/job/DSEA/job/tests-on-diff/64/ for more details.
Please register or sign in to reply