Skip to content

refactor: migrate server-test fixtures to shared root __fixtures__/seed/#1221

Merged
pyramation merged 1 commit into
mainfrom
feat/shared-seed-fixtures
May 23, 2026
Merged

refactor: migrate server-test fixtures to shared root __fixtures__/seed/#1221
pyramation merged 1 commit into
mainfrom
feat/shared-seed-fixtures

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

Summary

Eliminates the duplicated simple-seed-services/ fixture directory from graphql/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 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

Files updated:

  • server.integration.test.ts — services scenarios now reference root fixtures via shared() helper
  • express-context.integration.test.ts — same migration
  • upload.integration.test.tssetup.sql now 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

  • Run cd graphql/server-test && pnpm test — all 6 non-MinIO test suites should pass (125+ tests). Upload tests require MinIO (CI only).
  • Verify the path resolution: shared() uses 3 levels up from __tests__/ (not 4) to reach repo root __fixtures__/seed/
  • Confirm no other packages reference the deleted simple-seed-services/ directory

Notes

The search-seed/, schema-snapshot/, and simple-seed-storage/ directories still have their own setup.sql files 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 than simple-seed-services which was a pure duplicate.

Link to Devin session: https://app.devin.ai/sessions/2b5a29d83d3f478e8d3d972653b4879c
Requested by: @pyramation

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.
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@pyramation pyramation merged commit b2df206 into main May 23, 2026
37 checks passed
@pyramation pyramation deleted the feat/shared-seed-fixtures branch May 23, 2026 08:02
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