Skip to content

Tests: Document intentional live readme version checks - #15786

Closed
shail-mehta wants to merge 2 commits into
WordPress:trunkfrom
shail-mehta:tests/63914-readme-external-http
Closed

shail-mehta wants to merge 2 commits into
WordPress:trunkfrom
shail-mehta:tests/63914-readme-external-http

Conversation

@shail-mehta

@shail-mehta shail-mehta commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Trac ticket: #63914

What

Documents that the PHP, MySQL, and MariaDB freshness checks in Tests_Readme remain in the external-http group on purpose.

Why

Per #14686, declaration presence is covered offline by test_readme_contains_recommended_versions(). The three live methods check vendor support pages and should stay as intentional network smoke, matching test_ssl() in WP_HTTP_UnitTestCase.

How

  • Keep @group external-http on the three freshness checks
  • Add short docblocks explaining why they remain live
  • Add @ticket 63914

Testing instructions

  1. npm run test:php -- --filter Tests_Readme --exclude-group external-http
  2. Expect the offline declaration / helper tests only
  3. npm run test:php -- --filter Tests_Readme --group external-http
  4. Expect the three live freshness checks

Use of AI Tools

  • Cursor

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The release fixtures mirror the recommendations and manufacture passing EOL dates, allowing nonexistent versions and unsupported support windows to pass validation.

1 open issue
What changed in this PR

This PR removes live HTTP dependencies from the three Tests_Readme version checks, allowing them to run outside the external-http group.

Changes:

  • Adds mocked PHP, MySQL, and MariaDB responses through a shared HTTP-response helper.
  • Removes external-http annotations and adds ticket references.
  • Updates test documentation while leaving response-parser skip/fail coverage unchanged.
File Description
tests/​phpunit/​tests/​readme.php Replaces live version API responses with fixtures and moves the checks into the offline suite.

Review effort: Balanced

Comment thread tests/phpunit/tests/readme.php Resolved
Keep the PHP, MySQL, and MariaDB freshness checks in external-http. Offline coverage stays on the declaration test; these remain live smoke against vendor support pages, matching the test_ssl() pattern for #63914.
@shail-mehta
shail-mehta force-pushed the tests/63914-readme-external-http branch from 3722a58 to df4ae31 Compare November 7, 2026 05:46
@shail-mehta
shail-mehta requested a balanced review from Copilot November 7, 2026 05:48
Use a short summary plus an explicit "remains in external-http" note so the intentional live freshness checks match established #63914 documentation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are identified for the documentation-only clarification of offline and live HTTP test coverage.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@shail-mehta shail-mehta changed the title Tests: Mock readme version API checks without live HTTP Tests: Document intentional live readme version checks Nov 7, 2026
@shail-mehta
shail-mehta marked this pull request as ready for review November 7, 2026 15:04
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core Committers: Use this line as a base for the props when committing in SVN:

Props shailu25.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@lancewillett lancewillett left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'd close this one. It changes no test behavior: at eae3cd9, Tests_Readme runs the same 13 tests and 31 assertions offline as trunk, and the same three methods stay in external-http.

The decision to keep those three live is already recorded in r64732 ("Keep external-http on the three methods that check versions against external services"), and @group external-http on each method says the same thing in the code. The new docblocks repeat that in three places.

The @ticket 63914 tags would also mark these as regression tests for #63914, which is a cleanup task rather than a bug they guard against.

AI review · claude-opus-5-5

@shail-mehta shail-mehta closed this Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants