Skip to content

test: cover the migration failure branches codecov flagged - #125

Merged
josephfusco merged 1 commit into
mainfrom
test/upgrade-failure-coverage
Sep 5, 2026
Merged

test: cover the migration failure branches codecov flagged#125
josephfusco merged 1 commit into
mainfrom
test/upgrade-failure-coverage

Conversation

@josephfusco

Copy link
Copy Markdown
Collaborator

#110 shipped with schema.php's dbDelta-failure and unrecognized-table-shape branches untested (codecov/patch flagged 23 uncovered lines). Adds three tests that force each branch through a real MySQL failure rather than a mock.

@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.64%. Comparing base (f7553b8) to head (66f421c).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #125      +/-   ##
============================================
+ Coverage     71.09%   78.64%   +7.55%     
  Complexity       52       52              
============================================
  Files            11       11              
  Lines           384      384              
============================================
+ Hits            273      302      +29     
+ Misses          111       82      -29     
Flag Coverage Δ
multisite 78.64% <ø> (+7.55%) ⬆️
phpunit 73.75% <ø> (+7.61%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Neither dbDelta failing nor an unrecognized table shape had a test forcing
them, so the version-not-recorded guard in sync_storage_create_table() and
sync_storage_upgrade_table() ran untested.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@josephfusco
josephfusco force-pushed the test/upgrade-failure-coverage branch from 8b6370d to 66f421c Compare September 5, 2026 17:22
@josephfusco
josephfusco marked this pull request as ready for review September 5, 2026 17:24
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: josephfusco <joefusco@git.wordpress.org>

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

@josephfusco
josephfusco merged commit bc2d567 into main Sep 5, 2026
19 checks passed
@josephfusco
josephfusco deleted the test/upgrade-failure-coverage branch September 5, 2026 19:00
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.

1 participant