t840: make wu_duplicate_site action test fail on WP_Error#847
t840: make wu_duplicate_site action test fail on WP_Error#847superdav42 merged 1 commit intomainfrom
Conversation
Merge SummaryIssue: #840 — quality-debt: tests/WP_Ultimo/Helpers/Site_Duplicator_Test.php — PR #825 review feedback (medium) Change: Tightened assertion path in File changed: Testing: Low-risk test-only change. Self-assessed. No production code modified. aidevops.sh v3.8.24 plugin for OpenCode v1.4.3 with claude-sonnet-4-6 spent 2m on this as a headless worker. Overall, 10s since this issue was created. |
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 53 minutes and 33 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ilently skipping assertions Previously, if Site_Duplicator::duplicate_site() returned WP_Error, the test would silently pass with zero assertions, creating a false positive. Now the test calls $this->fail() with the error message, making failures visible. Resolves #840
84e51c4 to
d52a2bc
Compare
Merge SummaryIssue: #840 — quality-debt: tests/WP_Ultimo/Helpers/Site_Duplicator_Test.php — PR #825 review feedback (medium) Change: Tightened assertion path in File changed: Testing: Low-risk test-only change. Self-assessed. No production code modified. aidevops.sh v3.8.24 plugin for OpenCode v1.4.3 with claude-sonnet-4-6 spent 2m on this as a headless worker. Overall, 10s since this issue was created. Merged via PR #847 to main. |
|
Performance Test Results Performance test results for c274d8c are in 🛎️! Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown. URL:
|
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
Summary
Tightens the assertion path in
test_wu_duplicate_site_action_includes_from_site_idso the test fails immediately whenSite_Duplicator::duplicate_site()returns aWP_Error, rather than silently skipping all assertions and producing a false positive.Before: if duplication failed, the
if ( ! is_wp_error($result))block was skipped entirely — the test passed with zero assertions.After: if duplication fails,
$this->fail()is called with the error message, making the failure visible and ensuring the remaining assertions always run on success.Changes
tests/WP_Ultimo/Helpers/Site_Duplicator_Test.php: Replace silent-skip pattern with fail-fast$this->fail()check; unconditionally run payload assertions.Runtime Testing
Risk level: Low — test file only, no production code changed.
Verification:
self-assessed— the logic change is structurally equivalent; the only behaviour difference is that a previously-hidden failure path now surfaces.Resolves #840
aidevops.sh v3.8.24 plugin for OpenCode v1.4.3 with claude-sonnet-4-6 spent 2m and 5,190 tokens on this as a headless worker.