Documentation ¶
Overview ¶
Package testhelpers contains types and functions that may be useful in testing SDK functionality or custom integrations.
It contains two subpackages:
- github.com/launchdarkly/go-server-sdk/v6/testhelpers/ldtestdata, which provides a test fixture for setting flag values programmatically;
- github.com/launchdarkly/go-server-sdk/v6/testhelpers/storetest, which provides a standard test suite for custom persistent data store implementations.
The APIs in this package and its subpackages are supported as part of the SDK.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithMockLoggingContext ¶
func WithMockLoggingContext(t Fallible, action func(subsystems.ClientContext))
WithMockLoggingContext creates a ClientContext that writes to a MockLogger, executes the specified action, and then dumps the captured output to the console only if there's been a test failure.
Types ¶
Directories ¶
Path | Synopsis |
---|---|
Package ldservices provides HTTP handlers that simulate the behavior of LaunchDarkly service endpoints.
|
Package ldservices provides HTTP handlers that simulate the behavior of LaunchDarkly service endpoints. |
Package ldtestdata provides a mechanism for providing dynamically updatable feature flag state in a simplified form to an SDK client in test scenarios.
|
Package ldtestdata provides a mechanism for providing dynamically updatable feature flag state in a simplified form to an SDK client in test scenarios. |
Package storetest contains the standard test suite for persistent data store implementations.
|
Package storetest contains the standard test suite for persistent data store implementations. |
Click to show internal directories.
Click to hide internal directories.