Documentation
¶
Overview ¶
Package test provides a test helper that wraps testing.T and automatically initializes configuration and logger for unit and integration tests.
The Test struct serves as a central container for commonly used test dependencies including configuration, logger, testing.T context, and require.Assertions for assertions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Test ¶
type Test struct {
// contains filtered or unexported fields
}
Test is a test helper that wraps testing.T and provides access to initialized configuration, logger, and assertion utilities.
func New ¶
func New(t *testing.T) (*Test, *require.Assertions)
New creates and returns a Test instance and require.Assertions.
It automatically initializes configuration and logger, generates a unique test identifier, and creates require assertions. The function marks the calling test as a helper.
func (*Test) Assert ¶
func (t *Test) Assert() *require.Assertions
Assert returns the require.Assertions instance for performing assertions within the test.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package dbt provides test helpers for database operations using dbx.
|
Package dbt provides test helpers for database operations using dbx. |
|
Package fake provides utilities for generating fake test data using the faker library.
|
Package fake provides utilities for generating fake test data using the faker library. |
|
Package grmqt provides test helpers for RabbitMQ operations.
|
Package grmqt provides test helpers for RabbitMQ operations. |
|
Package grpct provides test helpers for gRPC server and client operations.
|
Package grpct provides test helpers for gRPC server and client operations. |
|
Package httpt provides test helpers for HTTP server and client operations.
|
Package httpt provides test helpers for HTTP server and client operations. |
|
Package kafkat provides test helpers for Kafka operations using the franz-go client.
|
Package kafkat provides test helpers for Kafka operations using the franz-go client. |
|
Package rct provides test helpers for remote configuration validation.
|
Package rct provides test helpers for remote configuration validation. |
|
Package stompt provides test helpers for STOMP messaging operations (typically used with ActiveMQ).
|
Package stompt provides test helpers for STOMP messaging operations (typically used with ActiveMQ). |