consultest

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package consultest Leveraging ittest package and HTTP VCR to record and replay consul operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsulWithRecorder

func ConsulWithRecorder(recorder *recorder.Recorder) consul.Options

func RecordedConsulProvider

func RecordedConsulProvider() fx.Annotated

func WithHttpPlayback

func WithHttpPlayback(t *testing.T, opts ...ConsulRecorderOptions) test.Options

Types

type ConsulRecorderConfig

type ConsulRecorderConfig struct {
	HTTPVCROptions []ittest.HTTPVCROptions
}

type ConsulRecorderOptions

type ConsulRecorderOptions func(cfg *ConsulRecorderConfig)

func HttpRecordingMode

func HttpRecordingMode() ConsulRecorderOptions

HttpRecordingMode enable "recording" mode. IMPORTANT: When Record mode is enabled, all sub tests interact with real Consul service.

So use this mode on LOCAL DEV ONLY

See ittest.HttpRecordingMode()

func MoreHTTPVCROptions

func MoreHTTPVCROptions(opts ...ittest.HTTPVCROptions) ConsulRecorderOptions

Jump to

Keyboard shortcuts

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