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.
Fallible is a general interface for anything with a Failed method. This is used by test helpers to generalize between *testing.T, assert.T, etc. when all that we care about is detecting test failure.
type Fallible interface { Failed() bool }
Name | Synopsis |
---|---|
.. | |
ldservices | Package ldservices provides HTTP handlers that simulate the behavior of LaunchDarkly service endpoints. |
ldtestdata | Package ldtestdata provides a mechanism for providing dynamically updatable feature flag state in a simplified form to an SDK client in test scenarios. |
storetest | Package storetest contains the standard test suite for persistent data store implementations. |