test-with-tidb
БесплатноБез исполняемых скриптовНе проверенRun Storj unit tests against TiDB (with the PostgreSQL master database), e.g. metabase on TiDB, the TiDB bucket eventing outbox, tidbutil.
от storj★ 3 286 звёзд на GitHubОб этом скилле
Run Unit Tests with TiDB
TiDB tests need two databases: TiDB for the metabase, and PostgreSQL as the "master" (satellite) database,
because satellitedb does not run on TiDB yet. The TiDB connection string carries the Postgres one after !!master=.
Start the databases (once)
From the repository root:
# Already up? Then skip the setup — it starts with `down -v` and would wipe the running stack.
docker compose -f testsuite/docker-compose.tests.yaml ps --status running postgres tidb
make test/setup/tidb
make test/setup/tidb starts postgres (port 5532) and tidb (port 4400) from testsuite/docker-compose.tests.yaml,
creates teststorj, and waits until TiDB accepts connections. The compose TiDB mounts testsuite/tidb.toml, whose
max-index-length = 12288 the metabase needs (a plain pingcap/tidb container fails the migration with
Error 1071: Specified key was too long ... 3072 bytes).
Keep the containers running between test runs; TiDB start-up is slow.
Run tests
export STORJ_TEST_TIDB='tidb://root@localhost:4400/storj?parseTime=true!!master=postgres://postgres:postgres@localhost:5532/teststorj?sslmode=disable'
export STORJ_TEST_POSTGRES=omit STORJ_TEST_COCKROACH=omit
go test -vet=off ./satellite/eventing -run TestTiDBEventSource
STORJ_TEST_POSTGRES=omit STORJ_TEST_COCKROACH=omitis required: without it the Postgres/Cockroach variants ofmetabasetest.Run*tests fail (not skip) with "connection string not provided", becausesatellite/metabase/metabasetest/run.godoes not skip on an empty URL likesatellitedbtest.Rundoes.- Add
-vonly together with-run; on a whole package it prints a lot. Add-raceonce before submitting (CI runs with it), not on every iteration. - Long packages such as
./satellite/metabaseneed-timeout 20m. - If the test name is given without a package, find the package with Grep first.
Report pass/fail and the subtests that ran. Check that the TiDB subtests really ran: a test without a TiDB
variant still reports ok with only the omitted variants skipped.
Common TiDB test packages: ./satellite/metabase, ./satellite/eventing (TestTiDBEventSource,
TestTiDBEventingEndToEnd), ./shared/dbutil/tidbutil.
Cleanup
When the user is done:
docker compose -f testsuite/docker-compose.tests.yaml down -v
Установить test-with-tidb в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(make test/setup/tidb)Bash(docker compose *)Bash(go *)FAQ
Что делает скилл test-with-tidb?
Run Storj unit tests against TiDB (with the PostgreSQL master database), e.g. metabase on TiDB, the TiDB bucket eventing outbox, tidbutil.
Как установить скилл test-with-tidb?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл test-with-tidb запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic