testhelpers

package
v6.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package testhelpers contains types and functions that may be useful in testing SDK functionality or custom integrations.

It contains two subpackages:

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

type Fallible

type Fallible interface {
	Failed() bool
}

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.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL