refactor: migrate server-test fixtures to shared root __fixtures__/seed/#1221
Merged
Conversation
Delete duplicated simple-seed-services/ from server-test/__fixtures__/seed/. Tests now compose from the shared root fixtures: - services/setup.sql (metaschema + services DDL) - services/test-data.sql (example database, APIs, domains) - app-schemas/simple-pets/schema.sql (animals table) - app-schemas/simple-pets/test-data.sql (5 test animals) Updated test files: - server.integration.test.ts (services scenarios → root fixtures) - express-context.integration.test.ts (→ root fixtures) - upload.integration.test.ts (setup.sql → root fixtures) Local-only fixtures (simple-seed, search-seed, schema-snapshot, simple-seed-storage) remain in server-test as they have unique content.
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Eliminates the duplicated
simple-seed-services/fixture directory fromgraphql/server-test/__fixtures__/seed/by migrating all tests to use the shared root__fixtures__/seed/fixtures created in PR #1213.Before:
simple-seed-services/contained 560 lines of SQL (setup.sql + schema.sql + test-data.sql) that was functionally identical to the root shared fixtures.After: Tests compose from the shared root:
services/setup.sql— metaschema + services DDLservices/test-data.sql— example database, APIs, domainsapp-schemas/simple-pets/schema.sql— animals tableapp-schemas/simple-pets/test-data.sql— 5 test animalsFiles updated:
server.integration.test.ts— services scenarios now reference root fixtures viashared()helperexpress-context.integration.test.ts— same migrationupload.integration.test.ts—setup.sqlnow comes from root (storage-specific files remain local)Local-only fixtures (
simple-seed,search-seed,schema-snapshot,simple-seed-storage) are unchanged — they have unique content.Review & Testing Checklist for Human
cd graphql/server-test && pnpm test— all 6 non-MinIO test suites should pass (125+ tests). Upload tests require MinIO (CI only).shared()uses 3 levels up from__tests__/(not 4) to reach repo root__fixtures__/seed/simple-seed-services/directoryNotes
The
search-seed/,schema-snapshot/, andsimple-seed-storage/directories still have their ownsetup.sqlfiles that partially duplicate the root services setup. These could be migrated in a follow-up, but each has unique additions (search indexes, snapshot schemas, storage tables) that make the consolidation less straightforward thansimple-seed-serviceswhich was a pure duplicate.Link to Devin session: https://app.devin.ai/sessions/2b5a29d83d3f478e8d3d972653b4879c
Requested by: @pyramation