mock

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MockPluginVersionEnv           = "TESTING_MOCK_VAULT_PLUGIN_VERSION"
	MockPluginDefaultInternalValue = "bar"
)

Variables

This section is empty.

Functions

func Backend

func Backend() *backend

Backend returns a private embedded struct of framework.Backend.

func ExpectInternalValue added in v0.11.0

func ExpectInternalValue(t *testing.T, client *api.Client, mountPath, expected string)

ExpectInternalValue checks the internal in-memory value.

func Factory

func Factory(ctx context.Context, conf *logical.BackendConfig) (logical.Backend, error)

Factory returns a new backend as logical.Backend.

func FactoryType

func FactoryType(backendType logical.BackendType) logical.Factory

FactoryType is a wrapper func that allows the Factory func to specify the backend type for the mock backend plugin instance.

func New

func New() (interface{}, error)

New returns a new backend as an interface. This func is only necessary for builtin backend plugins.

func WriteInternalValue added in v0.11.0

func WriteInternalValue(t *testing.T, client *api.Client, mountPath, value string)

WriteInternalValue is a helper to set an in-memory value in the plugin, allowing tests to later assert that the plugin either has or hasn't been restarted.

Types

This section is empty.

Jump to

Keyboard shortcuts

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