testplugin

package
v1.0.0-alpha.16 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 7 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 {
	*mongodb.Store
	// 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) Close

func (s *TestStoragePlugin) Close() error

Close the connection to the database.

func (*TestStoragePlugin) Connect

func (s *TestStoragePlugin) Connect() error

Connect sets up the test mongo instance if necessary.

func (*TestStoragePlugin) Setup

func (s *TestStoragePlugin) Setup() error

Setup runs mongodb on an alternate Port

func (*TestStoragePlugin) Teardown

func (s *TestStoragePlugin) Teardown() error

Teardown stops the test mongo instance and cleans up any temporary files.

Jump to

Keyboard shortcuts

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