go-integration-test

Run Go integration tests against PostgreSQL and Redis with testcontainers.

3|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/vndee/engineering-skills --skill go-integration-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-integration-test
Source: https://github.com/vndee/engineering-skills/tree/main/.claude/skills/go-integration-test
Command: npx skills add https://github.com/vndee/engineering-skills --skill go-integration-test

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go integration testing with real dependencies using testcontainers to validate end-to-end behavior without mocks.

Core Features & Use Cases

  • Real dependency testing: spins up actual Postgres and Redis instances via testcontainers to improve test reliability.
  • End-to-end test orchestration: wires up repository, use case, and HTTP handlers against a real database and services.
  • Migration validation: applies and verifies migrations to ensure schema correctness across environments.

Quick Start

Run integration tests with the integration build tag using go test ./...

Frequently Asked Questions about go-integration-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Go integration tests against real PostgreSQL and Redis instead of mocks?

Go integration testing with testcontainers spins up actual PostgreSQL and Redis instances to validate end-to-end behavior without mocks. This approach improves test reliability by wiring up repository, use case, and HTTP handlers against real databases and services.

What is the best way to validate database migrations during Go integration testing?

The best way to validate database migrations in Go integration testing is to apply and verify schemas against a real PostgreSQL instance. This ensures schema correctness across environments by testing migrations directly on containerized database instances.

Do I need testcontainers-go to run end-to-end HTTP lifecycle tests in Go?

Yes, you need testcontainers-go to orchestrate end-to-end HTTP lifecycle tests in Go. It requires the testcontainers-go library, relevant database images, and a migrations runner to apply schemas for real dependency testing.

Can I use testcontainers to wire up repository and use case layers against a real database?

Yes, you can use testcontainers to wire up repository, use case, and HTTP handlers against a real database. This end-to-end test orchestration validates your Go service's behavior against actual PostgreSQL and Redis instances.

Why use real infrastructure for Go integration testing instead of mocking database dependencies?

Using real infrastructure for Go integration testing improves test reliability by validating actual behavior against real PostgreSQL and Redis instances. Mocking database dependencies often fails to catch schema or connection issues that real infrastructure testing exposes.