Debian Codegraph @

internal/testutils/doc.go

raw
1 // Package testutils provides testing utilities for Shoutrrr services and types.
2 //
3 // This package contains helper functions, mock implementations, and test utilities
4 // used throughout the Shoutrrr test suite. It is designed to simplify common testing
5 // patterns and provide reusable components for testing notification services.
6 //
7 // # Main Components
8 //
9 // Configuration Testing (config.go)
10 //
11 // Provides functions to test ServiceConfig implementations including validation
12 // of query values, default values, enum counts, and field counts.
13 //
14 // Helper Functions (helpers.go)
15 //
16 // Contains various test helper utilities:
17 //
18 // - TestLogger: Creates test loggers that output to GinkgoWriter
19 // - URLMust: Parses URLs and fails tests on error
20 // - JSONRespondMust: Creates HTTP mock responders
21 // - TestServiceSetInvalidParamValue: Tests service parameter validation
22 //
23 // Faking/Mocking Utilities (fakers.go)
24 //
25 // Provides utilities for mocking I/O operations and network connections:
26 //
27 // - Eavesdropper: Interface for capturing connection conversations
28 // - CreateFailWriter: Simulates write failures for testing error handling
29 // - CreateTextConFaker: Creates fake textproto.Conn for protocol testing
30 //
31 // HTTP Mocking (mock_client_service.go)
32 //
33 // Defines the MockClientService interface for mocking HTTP client behavior
34 // in integration tests.
35 package testutils