When to use integration tests
Use integration tests to cover behavior across service boundaries, real databases, caches, and storage. These tests catch failures that mocks miss.Container patterns
Usepkg/dockertest for isolated, per-test containers. Use shared containers only when startup cost is prohibitive, and ensure data cleanup between tests.
Test harness
Usepkg/testutil when you need a full service graph and seeded data:
Bazel sizing
Integration tests that start containers must usesize = "large". Shared-container tests can use size = "medium".

