bstest

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

nolint Package bstest supplies helpers to test blobstores.

Index

Constants

View Source
const (
	// MaxBlobSize is the typical max blob size.
	MaxBlobSize = 34431
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Test

type Test struct {
	Many, Less, Few int
	// contains filtered or unexported fields
}

func NewTest

func NewTest(s blobstore.Store, t *testing.T) Test

NewTests will create a test object. This allows to run common tests on a blobstore.

func (Test) All

func (t Test) All(ctx context.Context)

All will run all tests as sub-tests.

func (Test) Basic

func (t Test) Basic(ctx context.Context, tt *testing.T)

Basic test basic set/get/delete functionality

func (Test) Colliding

func (t Test) Colliding(ctx context.Context, tt *testing.T)

Colliding runs concurrent get/set/delete operations, with colliding keys. This should usually be run with race detection.

func (Test) Concurrent

func (t Test) Concurrent(ctx context.Context, tt *testing.T)

Concurrent runs concurrent get/set/delete operations, but on unique keys/goroutine.

func (Test) Overlapping

func (t Test) Overlapping(ctx context.Context, tt *testing.T)

Overlapping runs concurrent get/set/delete operations, with colliding keys. Last operation should leave the This should usually be run with race detection.

Jump to

Keyboard shortcuts

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