Skip to content

Tests: Allow the checksum warning when replacing a development build - #1221

Open
swissspidy wants to merge 1 commit into
mainfrom
claude/wordpress-core-testing-automation-yrlybg
Open

swissspidy wants to merge 1 commit into
mainfrom
claude/wordpress-core-testing-automation-yrlybg

Conversation

@swissspidy

@swissspidy swissspidy commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

The two "Current version with WordPress-bundled Requests" scenarios in requests.feature fail when the suite runs against a WordPress core build (WP_CLI_TEST_CORE_ZIP, see Core Trac #64103):

$ wp core update --version=5.8 --force
...
Success: WordPress updated successfully.

Warning: Could not retrieve WordPress core checksums; skipping checksum-based cleanup. Files listed in $_old_files were still cleaned up.

The command unexpectedly produced STDERR output.

The installed development build (7.2-alpha-…) has no published checksums, so core-command's cleanup warns even though the update succeeds. Those two steps now use I try and check the return code, as in wp-cli/core-command#360. Against a stable release nothing changes.


Generated by Claude Code

Summary by CodeRabbit

  • Tests
    • Updated WordPress core update checks to require a successful exit status.
    • Clarified that checksum retrieval may produce warnings, including when using development builds. These checks help distinguish successful updates from failed commands without treating documented warnings as update failures.

Some scenarios start from `Given a WP install` and then replace it with an
older release. Core-command cleans up files by comparing checksums of the
old and new versions. When the installed version is a development build
(for example when testing against a WordPress core build), there are no
published checksums for it, so the command prints a warning and
`When I run` fails on STDERR.

These steps now use `I try` and check the return code instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CE81GsxUY597AdaMP1NXzk
@swissspidy
swissspidy requested a review from a team as a code owner November 27, 2026 17:12
Copilot AI balanced review requested due to automatic review settings November 27, 2026 17:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Both WordPress core update steps now use try-steps, document possible checksum-retrieval warnings, and explicitly require exit code 0.

Changes: WordPress Core Update Checks

Layer / File(s) Summary
Update step assertions
features/requests.feature
The WordPress 5.8 and 6.2 update steps now use try-steps, note possible checksum-retrieval warnings, and assert exit code 0.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested labels: scope:testing

Suggested reviewers: schlessera

Merge Risk: Minimal · up to 9b355

This is a test-only change that stops the update scenarios from failing on a checksum warning from development builds. Real update failures still fail the scenarios. Merge risk is minimal.

Architecture risk: Low · up to 9b355

The change affects 1 source area.

Changed areas: features

Review details

Systems and components

  • observed — 1 changed file mapped to features.

Before / after behavior

  • observed — Modified behavior in features/requests.feature: The WordPress 5.8 update changes from a regular run step to a try-step, adds a note about possible checksum-retrieval warnings, and explicitly asserts return code 0.
  • observed — Modified behavior in features/requests.feature: The WordPress 6.2 update changes from a regular run step to a try-step, adds a note about possible checksum-retrieval warnings, and explicitly asserts return code 0.
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change: the test steps now allow the checksum warning when replacing a development build. The raw summary confirms both WordPress core update steps in requests.feature switch to a …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change: the test steps now allow the checksum warning when replacing a development build. The raw summary confirms both WordPress core update steps in requests.feature switch to a try-step with an exit code 0 check and document the checksum warning for development builds. The title is specific and matches the main change, so it passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e981cd19-51bc-47cf-a298-1ccb632d7860
Commits

Reviewing files that changed from the base of the PR and between f7bd113 and 9b35553.

Files selected for processing: 1

  • features/requests.feature

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@github-actions github-actions Bot added bug Something isn't working scope:testing Related to testing labels Nov 27, 2026
@codecov

codecov Bot commented Nov 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants