testplugin

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestStoragePlugin

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

TestStoragePlugin is a test helper that implements a storage plugin backed by a mongodb instance that saves data to a temporary directory.

func NewTestStoragePlugin

func NewTestStoragePlugin(tc *portercontext.TestContext) *TestStoragePlugin

func (*TestStoragePlugin) Aggregate

func (s *TestStoragePlugin) Aggregate(ctx context.Context, opts plugins.AggregateOptions) ([]bson.Raw, error)

func (*TestStoragePlugin) Close

func (s *TestStoragePlugin) Close() error

Close removes the test database and closes the connection.

func (*TestStoragePlugin) Connect

func (s *TestStoragePlugin) Connect(ctx context.Context) error

Connect creates a new database for the current test The plugin itself is responsible for ensuring it was called. Close is called automatically when the plugin is used by Porter.

func (*TestStoragePlugin) Count

func (*TestStoragePlugin) EnsureIndex

func (*TestStoragePlugin) Find

func (*TestStoragePlugin) Insert

func (*TestStoragePlugin) Patch

func (*TestStoragePlugin) Remove

func (*TestStoragePlugin) Update

Jump to

Keyboard shortcuts

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