[PR #126] [MERGED] [tests] Make integration tests verify flows and name the fix location #130

Closed
opened 2026-10-13 19:47:43 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/126
Author: @Glitchy-Sheep
Created: 8/9/2026
Status: ✅ Merged
Merged: 8/9/2026
Merged by: @Glitchy-Sheep

Base: main ← Head: refactor/integration-test-flows


📝 Commits (1)

  • c77fd76 test: ✅ Flow-focused integration tests with targeted failure hints

📊 Changes

7 files changed (+112 additions, -148 deletions)

View changed files

📝 docs/development/02-testing.md (+2 -2)
📝 test/ABOUT_TESTING.md (+14 -15)
➖ test/integration/analysis/get_author_posts_test.py (+0 -78)
📝 test/integration/boosty_api/boosty_api_test.py (+29 -22)
📝 test/integration/fixtures.py (+1 -31)
📝 test/integration/flows/__init__.py (+0 -0)
➕ test/integration/flows/full_parse_flow_test.py (+66 -0)

📄 Description

Summary

The integration suite passed even when it checked nothing: half of the asserts were always true, and the analysis/ "tests" only printed JSON. Now every test follows a real user path and every failure says where the fix belongs.

Why now

  • The tolerant-reader work (#115) made the client survive unknown Boosty content - but no test walked the full path from credentials to domain-ready posts
  • A live incident showed what a useful failure looks like: it names the broken stage and the file to extend

What changed

  • New flows/full_parse_flow_test.py: credentials + author name -> posts page -> tolerant validation -> domain mapping
    • a post the client cannot parse fails the test with post IDs and "Add the missing DTOs in ..."
    • unknown content does not fail the run - it raises a warning with exact paths like data[8].playerUrls[0].type
  • Client tests assert real outcomes: a page must have posts, iteration must yield posts, pagination compares page contents
  • Pagination skips with a reason when the author fits in one page - it used to pass silently having checked nothing
  • Deleted the analysis/ JSON dumps - task posts-example is the explorer now
  • Removed the unused unauthorized_* fixtures and fixed a typo in a test name

Verification

  • Live run against the real Boosty API: 6 passed in 1.88s
  • The unknown-content warning fired on real data and named two playerUrls stream types to support
  • task check and 52 unit tests stay green

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Glitchy-Sheep/boosty-downloader/pull/126 **Author:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Created:** 8/9/2026 **Status:** ✅ Merged **Merged:** 8/9/2026 **Merged by:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Base:** `main` ← **Head:** `refactor/integration-test-flows` --- ### 📝 Commits (1) - [`c77fd76`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/c77fd7629d913630f7ece1d6c0bd31bc443bcd56) test: :white_check_mark: Flow-focused integration tests with targeted failure hints ### 📊 Changes **7 files changed** (+112 additions, -148 deletions) <details> <summary>View changed files</summary> 📝 `docs/development/02-testing.md` (+2 -2) 📝 `test/ABOUT_TESTING.md` (+14 -15) ➖ `test/integration/analysis/get_author_posts_test.py` (+0 -78) 📝 `test/integration/boosty_api/boosty_api_test.py` (+29 -22) 📝 `test/integration/fixtures.py` (+1 -31) 📝 `test/integration/flows/__init__.py` (+0 -0) ➕ `test/integration/flows/full_parse_flow_test.py` (+66 -0) </details> ### 📄 Description ## Summary The integration suite passed even when it checked nothing: half of the asserts were always true, and the `analysis/` "tests" only printed JSON. Now every test follows a real user path and every failure says where the fix belongs. ## Why now - The tolerant-reader work (#115) made the client survive unknown Boosty content - but no test walked the full path from credentials to domain-ready posts - A live incident showed what a useful failure looks like: it names the broken stage and the file to extend ## What changed - New `flows/full_parse_flow_test.py`: credentials + author name -> posts page -> tolerant validation -> domain mapping - a post the client cannot parse fails the test with post IDs and "Add the missing DTOs in ..." - unknown content does not fail the run - it raises a warning with exact paths like `data[8].playerUrls[0].type` - Client tests assert real outcomes: a page must have posts, iteration must yield posts, pagination compares page contents - Pagination skips with a reason when the author fits in one page - it used to pass silently having checked nothing - Deleted the `analysis/` JSON dumps - `task posts-example` is the explorer now - Removed the unused `unauthorized_*` fixtures and fixed a typo in a test name ## Verification - Live run against the real Boosty API: 6 passed in 1.88s - The unknown-content warning fired on real data and named two `playerUrls` stream types to support - `task check` and 52 unit tests stay green --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 19:47:43 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Glitchy-Sheep/boosty-downloader#130
No description provided.