AGENTS.md
dumpling/tests/AGENTS.mdAGENTS.md
Quality
81/100
Scores the file, not the repository.Length
484 words
10 headings · 4 code blocksRepository
40k
— · pushed 0 days agoLast changed
2 days ago
First indexed 2 days ago.1# AGENTS.md23This file adds path-specific guidance for Dumpling integration tests under4`dumpling/tests/**`. The repository root `AGENTS.md` still applies.56## Test Placement78- Prefer extending the nearest existing case in `dumpling/tests/<case>/run.sh`9 before adding a new case directory.10- Keep new cases focused on one Dumpling behavior or workflow. Avoid broad11 setup churn in shared cases unless the behavior under test needs it.12- Use deterministic table data and exact assertions against generated files in13 `$DUMPLING_OUTPUT_DIR`.14- Set up and clean the database/table state needed by the test block itself.15 Do not rely on state left by an earlier block in the same script.1617## Harness Helpers1819- Use `run_sql` for SQL setup and assertions against the source database.20- Use `run_dumpling` for Dumpling invocations instead of calling `bin/dumpling`21 directly, unless the test is specifically about the helper or command wrapper.22- Use `file_should_exist` and `file_not_exist` for simple file presence checks.23- Inspect dumped SQL or CSV output under `$DUMPLING_OUTPUT_DIR`; keep greps and24 cuts narrow enough that the assertion proves the intended behavior.2526## Ports and Services2728- `DUMPLING_TEST_PORT=4000` targets the TiDB server started by the Dumpling test29 harness. Use this for TiDB-specific features and TiDB version-gated behavior.30- `DUMPLING_TEST_PORT=3306` targets the external MySQL service expected by the31 harness. Use this only for MySQL compatibility coverage or existing cases that32 intentionally compare MySQL behavior.33- When a script switches ports, set `DUMPLING_TEST_PORT` explicitly before each34 block that depends on a specific server. Do not assume the previous block left35 the desired value.36- If a test depends on TiDB version parsing, verify the local or CI37 `bin/tidb-server` was built from a checkout with enough Git tag/history context38 for `git describe --tags` to produce a semver-shaped release string. A39 shallow or tagless checkout can make Dumpling detect TiDB as version `0.0.0`.4041## Running Tests4243Run commands from the repository root.4445```bash46# Build the TiDB server used by the harness when needed.47make server48```4950```bash51# Run every Dumpling integration case.52make dumpling_integration_test53```5455```bash56# Run one case.57CASE=basic make dumpling_integration_test58```5960```bash61# Run one case with shell tracing.62VERBOSE=true CASE=basic make dumpling_integration_test63```6465The `dumpling_integration_test` target checks these binaries before running:66`bin/tidb-server`, `bin/minio`, `bin/mc`, `bin/tidb-lightning`, and67`bin/sync_diff_inspector`. The required sync-diff binary path uses an underscore:68`bin/sync_diff_inspector`.6970The full harness also expects the `mysql` client and a local MySQL-compatible71server on `127.0.0.1:3306` for cases that target MySQL.7273## Validation Notes7475- For a small shell-only test change, run the changed case with76 `CASE=<case> make dumpling_integration_test` when local prerequisites are77 available.78- If unrelated blocks in the same case require unavailable local services, a79 focused TiDB-only reproduction may be useful while iterating, but report that80 the official case target was not fully run.81- `make bazel_prepare` is not required for changes limited to Dumpling shell82 integration tests or this file. Re-check root `AGENTS.md` if Go files, Bazel83 metadata, or module files are also changed.84
Also in pingcap/tidb
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| pingcap/tidbpkg/server/AGENTS.md · 40k | AGENTS.md | apidocs | 25/100 | 2 days ago | |
| pingcap/tidbAGENTS.md · 40k | AGENTS.md | buildtestlint-formatstyle+3 | 89/100 | 2 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| OnlyTerp/prompt-cache-skillsAGENTS.md · 112 | AGENTS.md | setupbuildtestlint-format+5 | 100/100 | 3 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| wpscanteam/wpscanAGENTS.md · 9.7k | AGENTS.md | setupbuildteststyle+6 | 100/100 | 2 days ago | |
| SkeneTechnologies/skene-cookbookAGENTS.md · 51 | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 2 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| trick77/agents-md-syncAGENTS.md · 2 | AGENTS.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| aaif-goose/gooseAGENTS.md · 52k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 3 days ago |
