airajena opened a new pull request, #49:
URL: https://github.com/apache/fineract-business-intelligence/pull/49

   ## Summary
   Add unit tests for the extractor module — COB gate, watermark logic, source 
query building, upsert SQL, replica lag check, and config loading.
   
   ## Test plan
   - 71 unit tests, no database required, runs in ~0.25s
   - Run locally: `pip install -r requirements-dev.txt && pytest 
tests/unit/extractor -v`
   - Added to CI (`compilation-checks` job) — runs on every push
   
   <!-- screenshot: all 71 tests passing -->
   
   ## Files changed
   
   **`.github/workflows/ci.yml`** (+4 lines)
   - Installs `requirements-dev.txt` in `compilation-checks` job
   - Adds step: `pytest tests/unit/extractor -v`, before the dbt parse step
   
   **`pytest.ini`** (new)
   - Test discovery config: path, file/function naming, `--strict-markers` + 
`-ra` flags
   
   **`requirements-dev.txt`** (new)
   - Test-only deps (`pytest`, `pytest-mock`, `freezegun`) — separate from 
`extractor/requirements.txt` so test tooling never ships into the production 
image
   
   **`tests/`** (new, 8 files, 71 tests)
   - `conftest.py` — shared fixtures: `FakeCursor`/`FakeConnection` (in-memory 
pg8000 stand-ins), `app_config`
   - `unit/extractor/test_*.py` — COB gate, config loading, quote/timestamp 
helpers, replica lag, source query building, upsert SQL, watermark logic
   
   ## Scope
   Extractor module only. dbt, Superset, and RLS test modules will follow in 
separate PRs.
   Parent Issue : 
[45](https://github.com/apache/fineract-business-intelligence/issues/45)
   
   ## Screenshots
   <img width="1482" height="714" alt="image" 
src="https://github.com/user-attachments/assets/364d2a32-171d-4046-b65f-d8d59d876711";
 />
   <img width="1562" height="698" alt="image" 
src="https://github.com/user-attachments/assets/d238e1c7-ef43-4ce6-8f4a-31179b160f78";
 />
   <img width="1612" height="689" alt="image" 
src="https://github.com/user-attachments/assets/52833ea2-8687-4456-8038-b667e5991095";
 />
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to