Skip to content

Add end-to-end tests to verify index limits when migrating from PostgreSQL#1245

Merged
pratickchokhani merged 10 commits intoGoogleCloudPlatform:masterfrom
nmemond:pg-index-limit-e2e-tests
Jan 7, 2026
Merged

Add end-to-end tests to verify index limits when migrating from PostgreSQL#1245
pratickchokhani merged 10 commits intoGoogleCloudPlatform:masterfrom
nmemond:pg-index-limit-e2e-tests

Conversation

@nmemond
Copy link
Contributor

@nmemond nmemond commented Dec 10, 2025

This is the second PR to add end-to-end tests to verify table and index limits when migrating from a PostgreSQL database. It focuses only on the schema migration portion, verification for the data migration is not included here.

It adds test for the following index limits:

  • indexes per database
  • indexes per table
  • index name length
  • number of columns in an index
  • maximum size of an index per row

These end-to-end tests are expected to run against an actual Spanner instance, not an emulated Spanner instance. As such, they have been separated from the other integration tests with a new env var, SPANNER_MIGRATION_TOOL_RUN_E2E_TESTS, to indicate that the E2E tests should be run.

Additionally, given that these run against an actual Spanner instance, they're a bit slower than other tests (on the order of minutes, not seconds). I expect it makes more sense to only run these on-demand instead of for every build.

Also, note that some of these tests don't actually pass: I've written them under the expectation that the limits are adhered to and that exceeding a limit leads to an error. This is unfortunately not the case for all limits: some succeed without any errors or issues, which of course fails the test. I'll be including the full details of all the issues and disparities in the actual parity report.

  • Tests pass
  • Appropriate changes to README are included in PR

@nmemond nmemond force-pushed the pg-index-limit-e2e-tests branch from 1c2caa7 to ecb3a32 Compare December 16, 2025 14:15
@nmemond nmemond marked this pull request as ready for review December 16, 2025 14:16
@nmemond nmemond requested a review from a team as a code owner December 16, 2025 14:16
@nmemond nmemond requested review from darshan-sj and rohitwali and removed request for a team December 16, 2025 14:16
@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.22%. Comparing base (f703cc9) to head (912f001).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1245   +/-   ##
=======================================
  Coverage   47.22%   47.22%           
=======================================
  Files         231      231           
  Lines       26698    26698           
  Branches      581      581           
=======================================
+ Hits        12607    12609    +2     
+ Misses      13370    13368    -2     
  Partials      721      721           
Components Coverage Δ
backend-apis 42.11% <ø> (ø)
backend-library 51.58% <ø> (ø)
cli 24.44% <ø> (ø)
frontend 38.82% <ø> (+0.04%) ⬆️
see 1 file with indirect coverage changes
🚀 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.

@pratickchokhani pratickchokhani merged commit 6939610 into GoogleCloudPlatform:master Jan 7, 2026
12 checks passed
@nmemond nmemond deleted the pg-index-limit-e2e-tests branch January 7, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants