Skip to content

Retire the legacy fixture loader - #4581

Open
evanchooly wants to merge 1 commit into
audits-last-legacyfrom
audits-retire-loader
Open

evanchooly wants to merge 1 commit into
audits-last-legacyfrom
audits-retire-loader

Conversation

@evanchooly

Copy link
Copy Markdown
Member

Step 7 of the operator-audit plan. Stacked on #4580.

Problem

TemplatedTestBase still carried the legacy fixture loader, about 340 lines:

  • it read data.json, action.json, expected.json and index.json by stack-trace name;
  • it split documents by counting braces;
  • it compared results with lenient JSONAssert and relaxed JSON, which the plan's evaluation found accepts reordered arrays, extra fields and wrong number types.

After #4580 no fixture uses it: every operator example has a scenario.json and runs on OperatorCaseRunner.

Change

TemplatedTestBase is now only the adapter for converted tests:

  • testPipeline, testQuery and testUpdate find the calling test's scenario through the example bindings and run it on the runner. A test without a scenario fails, rather than falling back to a lenient comparison.
  • loadData(collection, index) stays for the three converted tests that name an extra collection, and checks that the scenario seeds it.
  • The static helpers other tests use stay: rootToCore, JSON_WRITER_SETTINGS, toString and EXAMPLE_TEST_COLLECTION.

The design doc, README and progress file no longer list the loader as a legacy path.

Verification

  • Core operator tests: 548 pass under Critter, then reflection. That includes query/FiltersTest, the only subclass outside the four operator packages.
  • Audits suite passes under both mappers.

Self-reviewed only: the independent reviewers are out of quota until 2026-11-26.

Every operator example runs on the operator case runner, so
TemplatedTestBase keeps only the adapter that finds a test's scenario
through the example bindings and runs it, failing a test that has none.
The legacy data, action and expected loading, its lenient comparison and
its index helpers are removed.

This branch has not been deployed

No deployments
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