harness

package
v0.0.0-...-ff7342e Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2017 License: GPL-3.0, GPL-3.0-only Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigKey

type ConfigKey string
const (
	GoshawkDB      ConfigKey = "GOSHAWKDB_BINARY"
	ClusterConfig  ConfigKey = "GOSHAWKDB_CLUSTER_CONFIG"
	ClusterHosts   ConfigKey = "GOSHAWKDB_CLUSTER_HOSTS"
	ClusterCert    ConfigKey = "GOSHAWKDB_CLUSTER_CERT"
	ClusterKeyPair ConfigKey = "GOSHAWKDB_CLUSTER_KEYPAIR"
	ClientKeyPair  ConfigKey = "GOSHAWKDB_CLIENT_KEYPAIR"
	RootName       ConfigKey = "GOSHAWKDB_ROOT_NAME"
	GoPath         ConfigKey = "GOPATH"
)

func (ConfigKey) LoadFromEnv

func (ck ConfigKey) LoadFromEnv(env TestEnv) (bool, []byte, error)

type Connection

type Connection struct {
	*TestHelper
	log.Logger
	*client.Connection
	// contains filtered or unexported fields
}

func (*Connection) AwaitRootVersionChange

func (conn *Connection) AwaitRootVersionChange(guidBuf []byte, expectedPtrs int) ([]client.RefCap, error)

func (*Connection) SetRootToNZeroObjs

func (conn *Connection) SetRootToNZeroObjs(n int) ([]byte, error)

type TestEnv

type TestEnv map[ConfigKey]string

func GetTestEnv

func GetTestEnv() TestEnv

func (TestEnv) Clone

func (te TestEnv) Clone() TestEnv

func (TestEnv) EnsureEnv

func (te TestEnv) EnsureEnv(key ConfigKey, value string) string

type TestHelper

type TestHelper struct {
	TestInterface

	ClusterHosts  []string
	ClusterCert   []byte
	ClientKeyPair []byte
	RootName      string
	Rng           *rand.Rand
	// contains filtered or unexported fields
}

func NewHelper

func NewHelper(t TestInterface) *TestHelper

func NewMainHelper

func NewMainHelper() *TestHelper

func NewTestHelper

func NewTestHelper(t *testing.T) *TestHelper

func (*TestHelper) CreateConnections

func (th *TestHelper) CreateConnections(num int) []*Connection

func (*TestHelper) InParallel

func (th *TestHelper) InParallel(n int, fun func(int, *Connection) error) (*sync.WaitGroup, chan error)

func (*TestHelper) MaybeFatal

func (th *TestHelper) MaybeFatal(err error) error

func (*TestHelper) Shutdown

func (th *TestHelper) Shutdown()

type TestHelperTxnResult

type TestHelperTxnResult uint8
const Abort TestHelperTxnResult = iota

func (TestHelperTxnResult) Error

func (self TestHelperTxnResult) Error() string

type TestInterface

type TestInterface interface {
	log.Logger
	Fatal(keyvals ...interface{})
}

type TestTAdaptor

type TestTAdaptor struct {
	log.Logger
	*testing.T
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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