Examples
The repository includes end-to-end examples showing different integration-test stacks.
Path: examples/webapi
- Pure HTTP example
- Uses
WithTestServer+netoche - No external database dependency
Path: examples/sqlite
- In-memory SQLite setup
- Uses
WithConnectionFactory+WithMigrationRunner+WithTestServerFromEngine - Seeds data with
engine.Seed(...) - Validates API with
netoche
Path: examples/testcontainers_mysql
- MySQL via testcontainers
- Uses factory hooks to close containers (
WithAfterFactoryClose) - Uses
bancochecustom SQL validation
Path: examples/mongodb_assert
- MongoDB via testcontainers
- Uses
mongotestage.WithMongoConnection - Seeds via
mongoseeder - Asserts API with
netocheand DB state withmongochecker
From repository root:
| |
webapi,sqlite: no container runtime required.testcontainers_mysql,mongodb_assert: require Docker (or a compatible Testcontainers runtime) available on the machine.