dbtest

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, db TestableDB, cfg Config)

Run should be used to test any implementation of the storage.TrustDB interface. An implementation interface should at least have one test method that calls this test-suite.

Types

type Config

type Config dbtest.Config

Config holds the configuration for the trust database testing harness.

func (*Config) InitDefaults

func (cfg *Config) InitDefaults()

type TestableDB

type TestableDB interface {
	storage.TrustDB
	// Prepare should reset the internal state so that the db is empty and is ready to be tested.
	Prepare(*testing.T, context.Context)
}

TestableDB extends the trust db interface with methods that are needed for testing.

Jump to

Keyboard shortcuts

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