storagetest

package
Version: v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunBatchStorageTests

func RunBatchStorageTests(t *testing.T, factory batchStorageFactory)

RunBatchStorageTests runs all the batch storage tests against the provided map storage implementation.

func RunLogsAdminTests

func RunLogsAdminTests(t *testing.T, factory logAdminFactory)

RunLogsAdminTests runs all the admin tests against the provided storage implementation.

func RunMutationLogsReaderTests

func RunMutationLogsReaderTests(t *testing.T, factory logsRWFactory)

RunMutationLogsReaderTests runs all the tests against the provided storage implementation.

func RunMutationLogsTests

func RunMutationLogsTests(t *testing.T, factory mutationLogsFactory)

RunMutationLogsTests runs all the tests against the provided storage implementation.

Types

type BatchStorageTest

type BatchStorageTest func(ctx context.Context, t *testing.T, f batchStorageFactory)

type BatchTests

type BatchTests struct{}

BatchTests is a suite of tests to run against

func (*BatchTests) TestHighestRev

func (*BatchTests) TestHighestRev(ctx context.Context, t *testing.T, f batchStorageFactory)

func (*BatchTests) TestNotFound

func (*BatchTests) TestNotFound(ctx context.Context, t *testing.T, f batchStorageFactory)

func (*BatchTests) TestReadBatch

func (*BatchTests) TestReadBatch(ctx context.Context, t *testing.T, f batchStorageFactory)

func (*BatchTests) TestWriteBatch

func (*BatchTests) TestWriteBatch(ctx context.Context, t *testing.T, f batchStorageFactory)

type LogsReadWriter

type LogsReadWriter interface {
	sequencer.LogsReader

	// SendBatch submits the whole group of mutations atomically to a given log.
	// Returns the watermark key that the mutation batch got written at. This
	// watermark can be used as a lower bound argument of a ReadLog call. To
	// acquire a watermark to use for the upper bound, use HighWatermark.
	SendBatch(ctx context.Context, directoryID string, logID int64, batch []*pb.EntryUpdate) (water.Mark, error)
}

LogsReadWriter supports test's ability to write to and read from the mutation logs.

Jump to

Keyboard shortcuts

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