Documentation
¶
Overview ¶
Package testutil provides shared testing utilities and mocks. This package contains test helpers that should be excluded from code coverage reporting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithEnv ¶
func WithEnv(key, value string, fn func(logger *MockLogger))
WithEnv temporarily sets an environment variable for the duration of a test function. It automatically restores the original value and sets up a mock logger.
Types ¶
type MockLogger ¶
MockLogger is a test double for the logger that captures Fatal calls.
Click to show internal directories.
Click to hide internal directories.