test-with-postgres
Run unit tests that require PostgreSQL. Use this skill when the user wants to run tests with PostgreSQL database backend. Automatically handles checking for and configuring a PostgreSQL Docker container.
Install
mkdir -p .claude/skills/test-with-postgres && curl -L -o skill.zip "https://mcp.directory/api/skills/download/5913" && unzip -o skill.zip -d .claude/skills/test-with-postgres && rm skill.zipInstalls to .claude/skills/test-with-postgres
About this skill
Run Unit Tests with PostgreSQL
You are helping run unit tests that require PostgreSQL.
Instructions
Starting PostgreSQL
PostgreSQL must be running before tests can execute. Use Docker to start a PostgreSQL instance:
# Check if postgres container is already running
docker ps --filter name=storj_unit_tests_postgres --format '{{.Names}}'
# If not running, start it:
docker run --rm -d -p 5433:5432 --name storj_unit_tests_postgres -e POSTGRES_PASSWORD=tmppass postgres:17
# Wait for postgres to be ready (retry until successful)
until docker exec storj_unit_tests_postgres psql -h localhost -U postgres -d postgres -c "select 1" > /dev/null 2>&1; do
echo "Waiting for postgres server..."
sleep 1
done
# Create test database
docker exec storj_unit_tests_postgres psql -h localhost -U postgres -c "create database teststorj;"
Alternatively, run testsuite/postgres-dev.sh which handles all setup automatically.
Running Tests
-
If test name is provided in arguments:
- Find the package containing the test using Grep
- Run the test with PostgreSQL configured
-
If only package path is provided:
- Run all tests in that package with PostgreSQL configured
-
Command format:
go test -v ./package/path -run TestName -postgres-test-db 'postgres://postgres:tmppass@localhost:5433/teststorj?sslmode=disable'
-
Report test results:
- Show whether tests passed or failed
- List all subtests that ran
- If tests failed, offer to help investigate the failures
-
Stop the Docker container after tests complete:
docker rm -f storj_unit_tests_postgres
Common test paths
Some common test paths in the Storj codebase:
./satellite/metabase- Metabase tests./satellite/metainfo- Metainfo API tests./satellite/satellitedb- Database tests
Example Usage
# Run a specific test
go test -v ./satellite/metainfo -run TestEndpoint_Object_No_StorageNodes -postgres-test-db 'postgres://postgres:tmppass@localhost:5433/teststorj?sslmode=disable'
# Run all tests in a package
go test -v ./satellite/metabase -postgres-test-db 'postgres://postgres:tmppass@localhost:5433/teststorj?sslmode=disable'
# Run tests with timeout
go test -v -timeout 10m ./satellite/metabase -run TestLoop -postgres-test-db 'postgres://postgres:tmppass@localhost:5433/teststorj?sslmode=disable'
Cleanup
To stop the PostgreSQL container when done:
docker rm -f storj_unit_tests_postgres
Notes
- The container uses port 5433 to avoid conflicts with any local PostgreSQL installation on the default port 5432
- Tests automatically create isolated test databases for each test run
- Use
STORJ_TEST_POSTGRES='omit'to skip PostgreSQL tests
More by storj
View all skills by storj →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversBMAD streamlines agile project management by uniting business and development teams for efficient delivery using agile p
Boost productivity with Task Master: an AI-powered tool for project management and agile development workflows, integrat
Create modern React UI components instantly with Magic AI Agent. Integrates with top IDEs for fast, stunning design and
DBHub: Universal database gateway to view SQLite database, run sequel queries & browse tables. Secure, safe, and easy-to
pg-aiguide — Version-aware PostgreSQL docs and best practices tailored for AI coding assistants. Improve queries, migrat
Empower your Unity projects with Unity-MCP: AI-driven control, seamless integration, and advanced workflows within the U
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.