Page MenuHomePhabricator

Improve mediawiki-event-enrichment test suite
Closed, ResolvedPublic

Description

Goal/Background

We should improve testing for mediawiki-event-enrichment. A good baseline for comparison is the Scala version of this application, that has a more comprehensive unit and integration test suite.

Key Tasks/Dependencies

Acceptance Criteria

  • Unit tests for the enrichment function logic are provided
  • Integration tests (e2e) for the streaming enrichment application are provided. Tests do not depend on remote hosts. HTTPs responses should be mocked.
  • The repo is restructured with a more pythonic layout

Details

TitleReferenceAuthorSource BranchDest Branch
Add test coveragerepos/data-engineering/mediawiki-event-enrichment!57tchinadd-test-coveragemain
Mock requests response for testsrepos/data-engineering/mediawiki-event-enrichment!54tchinmock-httpmain
Customize query in GitLab

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
JArguello-WMF renamed this task from [NEEDS GROOMING] Improve mediawiki-event-enrichment test suite to Improve mediawiki-event-enrichment test suite.Mar 13 2023, 3:46 PM

Oof, was looking at how to potentially mock the http session and response object, but turns out mocks don't work when pickled/multiprocessed. I guess the only option is to spin up a web server during testing and hit that instead