badgerauthtest

package
v1.91.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package badgerauthtest is roughly inspired by the design of the storj/satellite/metabase/metabasetest package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run added in v1.88.1

func Run(t *testing.T, parallel bool, config badgerauth.Config, fn func(ctx *testcontext.Context, t *testing.T, log *zap.Logger, db *badgerauth.DB))

Run tests against a single badgerauth.(*DB).

Types

type Get

type Get struct {
	KeyHash authdb.KeyHash
	Result  *authdb.Record
	Error   error
}

Get is for testing badgerauth.(*DB).Get method.

func (Get) Check

func (step Get) Check(ctx *testcontext.Context, t testing.TB, db *badgerauth.DB)

Check runs the test.

type Put

type Put struct {
	KeyHash authdb.KeyHash
	Record  *authdb.Record
	Error   error
}

Put is for testing badgerauth.(*DB).Put method.

func (Put) Check

func (step Put) Check(ctx *testcontext.Context, t testing.TB, db *badgerauth.DB)

Check runs the test.

type PutAtTime

type PutAtTime struct {
	KeyHash authdb.KeyHash
	Record  *authdb.Record
	Error   error
	Time    time.Time
}

PutAtTime is for testing badgerauth.(*DB).PutAtTime method.

func (PutAtTime) Check

func (step PutAtTime) Check(ctx *testcontext.Context, t testing.TB, db *badgerauth.DB)

Check runs the test.

Jump to

Keyboard shortcuts

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