testing
Skill3.6k starsChanged 2 months agoMITView on GitHub
Run and troubleshoot tests for DBHub, including unit tests, integration tests with Testcontainers, and database-specific tests. Use when asked to run tests, fix test failures, debug integration tests, troubleshoot Docker/database container issues, or add new tests. Also use when verifying code changes work correctly or when CI test failures need investigation.
123 other projects use a version of this.
Trending
More talk lately.about the whole repository
Most recently taken up by
- timmo001/skillstheir own version, first seen Oct 5, 2026
- kortix-ai/sunatheir own version, first seen Oct 5, 2026
- gilsmt/skillstheir own version, first seen Oct 4, 2026
- andeeplus/aplustheir own version, first seen Oct 4, 2026
- JetBrains/intellij-communitytheir own version, first seen Oct 3, 2026
- shinpr/codex-workflowstheir own version, first seen Oct 2, 2026
Who's talking about bytebase/dbhub
- modelcontextprotocol/servers“Claude Desktop invokes MCP server docker image twice on startup”GitHub · Mar 12, 2025 · 6 reactions
- @ottoke.bsky.social“If you are integrating LLMs with databases, check out github.com/bytebase/dbh... - a universal MCP server …”Bluesky · Jun 21, 2025 · 2 likes
- sudosubin/agents.nix“agent-skills.github.bytebase.dbhub: 1.3.1 → 1.4.0”GitHub · Oct 3, 2026
- PermanentOrg/roboterry“Bump @bytebase/dbhub from 1.2.1 to 1.3.1”GitHub · Oct 1, 2026
- kingsa2026/Neurova“build(deps): bump the npx-runtime-minor-patch group across 1 directory with 2 updates”GitHub · Sep 29, 2026
The biggest 5 of 22 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 22
Talked about on GitHub and Bluesky (22 times).
On GitHub · 21
- Mar 12, 2025Claude Desktop invokes MCP server docker image twice on startup — modelcontextprotocol/servers6 reactions · 11 comments
- Oct 3, 2026agent-skills.github.bytebase.dbhub: 1.3.1 → 1.4.0 — sudosubin/agents.nix0 reactions
- Oct 1, 2026Bump @bytebase/dbhub from 1.2.1 to 1.3.1 — PermanentOrg/roboterry0 reactions
- Sep 29, 2026build(deps): bump the npx-runtime-minor-patch group across 1 directory with 2 updates — kingsa2026/Neurova0 reactions · 1 comment
- Sep 26, 2026agent-skills.github.bytebase.dbhub: init at 1.3.1 — sudosubin/agents.nix0 reactions
16 more on GitHub
- Sep 1, 2026Bump @bytebase/dbhub from 0.24.0 to 1.2.1 — PermanentOrg/roboterry0 reactions · 1 comment
- Aug 1, 2026Bump @bytebase/dbhub from 0.22.4 to 0.24.0 — PermanentOrg/roboterry0 reactions · 1 comment
- Jul 31, 2026Add bytebase/dbhub to databases — tolkonepiu/best-of-mcp-servers0 reactions · 1 comment
- Jul 1, 2026Bump @bytebase/dbhub from 0.21.2 to 0.22.4 — PermanentOrg/roboterry0 reactions
- Jun 6, 2026content(mcp): add DBHub MCP Server — JSONbored/awesome-claude0 reactions · 3 comments
- Apr 8, 2026Add bytebase/dbhub to Databases section 🤖🤖🤖 — punkpeye/awesome-mcp-servers0 reactions · 2 comments
- Mar 9, 2026Add dbhub mcp — negi524/nestjs-starter0 reactions
- Feb 23, 2026feat: add SSH keepalive configuration options — takemi-ohama/dbhub0 reactions
- Jan 23, 2026Add MCP section — mgramin/awesome-db-tools0 reactions · 2 comments
- Jan 5, 2026Add DBHub SQLite MCP server shared workflow — github/gh-aw0 reactions · 2 comments
- Dec 21, 2025[MCP Catalog] New MCP server candidate: bytebase/dbhub — obot-platform/mcp-catalog0 reactions
- Dec 21, 2025[MCP Catalog] New MCP server candidate: io.github.bytebase/dbhub — obot-platform/mcp-catalog0 reactions
- Nov 26, 2025[Server Request]: DBHub — cursor/mcp-servers0 reactions · 1 comment
- Jul 9, 2025[docs] Add Install Buttons to Readme — googleapis/mcp-toolbox0 reactions · 3 comments
- Mar 25, 2025MCP: Update to `@bytebase/dbhub@0.2.2` — crate/cratedb-examples0 reactions · 1 comment
- Mar 13, 2025feat: add DBHub - Universal database MCP server — modelcontextprotocol/servers0 reactions
On Bluesky · 1
- Jun 21, 2025If you are integrating LLMs with databases, check out github.com/bytebase/dbh... - a universal MCP server connecting to MariaDB, TiDB,… — @ottoke.bsky.social2 likes and reposts · 1 reply
Used with
Projects with it also use oss-pr, pr-automation and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
CES-LtdSkilloss-pr
Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.
Also in 3 projects that use this
CES-LtdSkillpr-automation
PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".
Also in 3 projects that use this
ffsshhttiikkSkillcicd
Continuous integration and delivery pipelines
Also in 4 projects that use this
ffsshhttiikkSkillnetworking
Practical application and coding skills for Networking
Also in 3 projects that use this
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 9 projects that use this
Cogni-AI-OUSkilldotfiles
Reference for repository dotfiles, including their purposes, standard configurations, and usage guidelines. You MUST load this skill when configuring, troubleshooting, or understanding repository dotfiles.
Also in 3 projects that use this
- +2 more from CES-Ltd
- +1 more from ffsshhttiikk
Other versions123 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 123
- lobehub/lobehub★ 83ksame name
- iOfficeAI/AionUi★ 33ksame name
- JetBrains/intellij-community★ 21ksame name
- kortix-ai/suna★ 20ksame name
- modelcontextprotocol/inspector★ 11ksame name
- microsoft/fast★ 9.7ksame name
- theopenco/llmgateway★ 1.7ksame name
- BankrBot/skills★ 1.2ksame name
- microsoft/CCF★ 875same name
- rshankras/claude-code-apple-skills★ 777same name
113 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- fix-bugSkill
- dbhubSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 105 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Run a specific test file:
- Distinctive: line 25
Run tests matching a name pattern:
- Very specific: line 39
integration: Only *integration*.test.ts files
- Distinctive: line 110
Before running integration tests:
- Very specific: line 153
Unit test: Create src/{module}/__tests__/{name}.test.ts — will auto-run with pnpm test:unit.
- Very specific: line 155
Integration test: Create src/{module}/__tests__/{name}.integration.test.ts — the integration in the filename is what routes it to pnpm …
“Common” is measured: kept by at least 6 in 10 of the 105 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Testing Skill
This skill helps you run, write, and troubleshoot tests in the DBHub project.
Test Commands
pnpm test # Run all tests (unit + integration)
pnpm test:unit # Unit tests only (no Docker needed)
pnpm test:watch # Interactive watch mode
pnpm test:integration # Integration tests only (requires Docker)Run a specific test file:
pnpm test src/connectors/__tests__/postgres.integration.test.ts
pnpm test src/utils/__tests__/allowed-keywords.test.tsRun tests matching a name pattern:
pnpm test -- --testNamePattern="PostgreSQL"Verbose output for debugging:
pnpm test:integration --reporter=verboseTest Architecture
Vitest is configured with two projects in vitest.config.ts:
- unit: All
*.test.tsfiles excluding*integration*in the filename - integration: Only
*integration*.test.tsfiles
This means the naming convention matters — integration tests MUST have integration in their filename to be correctly categorized.
Test File Locations
Unit tests (~20 files, no Docker needed):
src/utils/__tests__/— Utility function tests (SQL parsing, DSN obfuscation, SSH config, allowed keywords, identifier quoting, parameter mapping, row limiting, safe URL, config watcher, AWS RDS signer)src/tools/__tests__/— Tool handler tests (execute-sql, search-objects, custom-tool-handler)src/config/__tests__/— Configuration tests (env parsing, TOML loading)src/connectors/__tests__/— Connector unit tests (dsn-parser, manager)src/requests/__tests__/— Request store tests
Integration tests (~11 files, Docker required):
src/connectors/__tests__/postgres.integration.test.tssrc/connectors/__tests__/mysql.integration.test.tssrc/connectors/__tests__/mariadb.integration.test.tssrc/connectors/__tests__/sqlserver.integration.test.tssrc/connectors/__tests__/oracle.integration.test.tssrc/connectors/__tests__/sqlite.integration.test.tssrc/connectors/__tests__/postgres-ssh.integration.test.tssrc/connectors/__tests__/multi-sqlite-sources.integration.test.tssrc/__tests__/json-rpc-integration.test.tssrc/api/__tests__/sources.integration.test.tssrc/api/__tests__/requests.integration.test.tssrc/config/__tests__/ssh-config-integration.test.ts
IntegrationTestBase
Database connector integration tests extend IntegrationTestBase<TContainer> from src/connectors/__tests__/shared/integration-test-base.ts. This abstract class provides:
- Lifecycle: Container start in
beforeAll(120s timeout) → connect → setup test data → run tests → cleanup inafterAll - Shared test suites:
createConnectionTests(),createSchemaTests(),createTableTests(),createSQLExecutionTests(),createStoredProcedureTests(),createCommentTests(),createErrorHandlingTests() - Standard test data:
userstable (id, name, email, age) +orderstable (id, user_id, amount) +test_schema.products
To add a new database connector test, extend this class and implement:
createContainer()— Start the Testcontainers instancecreateConnector()— Create the database connectorsetupTestData(connector)— Populate test tables
Test Fixtures
Located in src/__fixtures__/:
helpers.ts— Utilities:fixtureTomlPath(),loadFixtureConfig(),setupManagerWithFixture()toml/multi-sqlite.toml— Three in-memory SQLite databases (database_a, database_b, database_c)toml/readonly-maxrows.toml— Sources with readonly/max_rows tool configurations
Usage:
import { setupManagerWithFixture, FIXTURES } from '../../__fixtures__/helpers.js';
const manager = await setupManagerWithFixture(FIXTURES.MULTI_SQLITE);
// ... test ...
await manager.disconnect();Mocking Patterns
Unit tests use vitest mocking:
vi.mock('../../connectors/manager.js'); // Mock ConnectorManager
vi.mocked(ConnectorManager.getCurrentConnector).mockReturnValue(mockConnector);SSH tunnel tests mock SSHTunnel.prototype.establish to avoid real SSH connections while testing config passing.
Integration Testing
Integration tests use Testcontainers to run real database instances in Docker.
Prerequisites
Before running integration tests:
- Docker is installed and running:
docker ps - Sufficient Docker memory (4GB+ recommended, especially for SQL Server)
- Network access to pull Docker images
Database Images
| Database | Image | Notes |
| PostgreSQL | postgres:15-alpine | Fast startup |
| MySQL | @testcontainers/mysql | Supports IAM auth testing |
| MariaDB | @testcontainers/mariadb | Supports IAM auth testing |
| SQL Server | @testcontainers/mssqlserver | Slow startup (3-5 min), needs 4GB+ RAM |
| Oracle | @testcontainers/oraclefree (gvenzl/oracle-free:23-slim-faststart) | ~1.2GB pull, 1-2 min startup, needs 2GB+ RAM |
| SQLite | No container needed | In-memory or file-based |
Troubleshooting
Container Startup Failures
docker ps # Verify Docker is running
docker system df # Check disk space
docker pull postgres:15-alpine # Manually pull imagesSQL Server Timeouts
SQL Server containers are the slowest to start (3-5 minutes). Run them separately and ensure Docker has 4GB+ memory:
pnpm test src/connectors/__tests__/sqlserver.integration.test.tsTest Isolation Issues
Each integration test manages its own container lifecycle. If containers leak, clean up:
docker ps -a | grep testcontainers # Find leaked containers
docker container prune # Clean up stopped containersCI Failures
The CI workflow (.github/workflows/run-tests.yml) runs unit and integration tests as separate parallel jobs on PR events. Unit tests don't need Docker; integration tests verify Docker availability first. Check the specific job that failed.
Adding New Tests
Unit test: Create src/{module}/__tests__/{name}.test.ts — will auto-run with pnpm test:unit.
Integration test: Create src/{module}/__tests__/{name}.integration.test.ts — the integration in the filename is what routes it to pnpm test:integration.
New connector test: Extend IntegrationTestBase, implement the three abstract methods, and call the shared test suite methods.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

