storagetest

package
Version: v0.0.0-...-8fe3277 Latest Latest
Warning

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

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

Documentation

Overview

Package storagetest is a test suite for raft.Storage implementations.

The otherwise read-only storage interface is augmented with write methods for use in the tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunTests

func RunTests(t *testing.T, setUp func(*testing.T) WriteableStorage,
	tearDown func(*testing.T, WriteableStorage))

RunTests runs the test suite. The setUp and tearDown functions will be called at the beginning and end of each test case.

Types

type WriteableStorage

type WriteableStorage interface {
	raft.Storage
	Append(entries []raftpb.Entry) error
	SetHardState(st raftpb.HardState) error
}

WriteableStorage is a raft.Storage with some additional write methods for testing.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL