File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,6 +124,25 @@ stdout against `stdout.txt`. A case that is expected to fail commits its
124124` stderr.txt ` . Regenerate a golden by running the command in its directory and
125125writing the output back over the committed file.
126126
127+ ` TestReplay ` runs the whole corpus once per * context* . ` base ` runs each case as
128+ committed and ` managed-db ` reruns it against a live database, so a context can
129+ change the config a case is generated with and the experiments it is generated
130+ under. A case restricts itself to some of them with ` "contexts": [...] ` in its
131+ ` exec.json ` , and commits per-context expected errors as ` stderr/<context>.txt ` .
132+ There is only one set of committed golden files, so every context is expected
133+ to generate identical code.
134+
135+ The ` core ` context generates every case through the analysis core
136+ (` SQLCEXPERIMENT=coreanalyzer ` ). The two paths still disagree, so it is opt-in
137+ and needs no database:
138+
139+ ``` bash
140+ SQLC_TEST_CORE=1 go test ./internal/endtoend -run ' TestReplay/core'
141+ ```
142+
143+ Go aborts a test binary on panic, so a case that panics the core analyzer ends
144+ the run early. Run a subset to get past one (` -run 'TestReplay/core/^select' ` ).
145+
127146### Example Tests
128147
129148- ** Location:** ` /examples/ ` directory
You can’t perform that action at this time.
0 commit comments