Documentation
¶
Overview ¶
Package testing provides testing utilities for gorp framework. This file provides container setup helpers for integration tests. Creates test container with config, logger, DB, Redis capabilities.
测试包提供 gorp 框架的测试工具能力。 本文件提供用于集成测试的容器设置 helper。 创建携带 config、logger、DB、Redis 能力的测试容器。
Package testing provides testing utilities for gorp framework. This file provides environment variable helpers for tests. Sets env and returns restore func for cleanup.
测试包提供 gorp 框架的测试工具能力。 本文件提供环境变量测试 helper。 设置环境变量并返回 restore 函数用于清理。
Package testing provides testing utilities for gorp framework. This file provides working directory helpers for tests. Changes working directory to repo root where go.mod lives.
测试包提供 gorp 框架的测试工具能力。 本文件提供工作目录测试 helper。 切换工作目录到 go.mod 所在的仓库根目录。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChdirRepoRoot ¶
func ChdirRepoRoot() error
ChdirRepoRoot changes working directory to the repo root (where go.mod lives).
func NewTestContainer ¶
func NewTestContainer(t *testing.T) (runtimecontract.Container, cleanupFunc)
NewTestContainer builds a container configured for tests: - APP_ENV=testing - miniredis
Types ¶
This section is empty.