test(spanner): support running integration tests on real Spanner#5683
test(spanner): support running integration tests on real Spanner#5683olavloite wants to merge 3 commits into
Conversation
The Spanner integration tests are executed against the Spanner emulator in the CI builds, as the emulator is significantly faster for typical test workloads, such as repeatedly executing DDL statements. This change adds support for running the same integration tests against a real Spanner instance.
There was a problem hiding this comment.
Code Review
This pull request enables integration tests to run against real Google Cloud Spanner instances in addition to the emulator. It introduces a define_test_suites! macro in the test driver to manage the lifecycle of tests, including client provisioning and shared database cleanup. Key changes include the addition of google-cloud-spanner-admin-database-v1 for database management, logic to clean up stale test databases, and updates to existing tests to handle behavioral differences between the emulator and real Spanner, such as varying error types and query statistics. I have no feedback to provide.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5683 +/- ##
=======================================
Coverage 97.89% 97.89%
=======================================
Files 226 226
Lines 55405 55405
=======================================
Hits 54236 54236
Misses 1169 1169 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The Spanner integration tests are executed against the Spanner emulator in the CI
builds, as the emulator is significantly faster for typical test workloads, such
as repeatedly executing DDL statements. This change adds support for running the
same integration tests against a real Spanner instance.