testhelpers

package
v5.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: Apache-2.0 Imports: 2 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: ldtestdata, which provides a test fixture for setting flag values programmatically, and 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

This section is empty.

Types

type SimpleClientContext

type SimpleClientContext struct {
	// contains filtered or unexported fields
}

SimpleClientContext is a reference implementation of interfaces.ClientContext for test code.

The SDK uses the ClientContext interface to pass its configuration to subcomponents. Its standard implementation also contains other environment information that is only relevant to built-in SDK code. SimpleClientContext may be useful for external code to test a custom component.

func NewSimpleClientContext

func NewSimpleClientContext(sdkKey string) SimpleClientContext

NewSimpleClientContext creates a SimpleClientContext instance, with a standard HTTP configuration and a disabled logging configuration.

func (SimpleClientContext) GetBasic

func (SimpleClientContext) GetHTTP

func (SimpleClientContext) GetLogging

func (SimpleClientContext) WithHTTP

WithHTTP returns a new SimpleClientContext based on the original one, but adding the specified HTTP configuration.

func (SimpleClientContext) WithLogging

WithLogging returns a new SimpleClientContext based on the original one, but adding the specified logging configuration.

Directories

Path Synopsis
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