testutils

package
v0.0.0-...-d9a8df2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsError

func IsError(err error, re string) bool

IsError returns true if err is non-nil and the error string matches the supplied regexp.

func IsPError

func IsPError(pErr *roachpb.Error, re string) bool

IsPError returns true if pErr is non-nil and the error message matches the supplied regexp.

func MakeKey

func MakeKey(keys ...[]byte) []byte

MakeKey makes a new key which is the concatenation of the given inputs, in order.

func NewNodeTestBaseContext

func NewNodeTestBaseContext() *base.Context

NewNodeTestBaseContext creates a base context for testing. This uses embedded certs and the default node user. The default node user has both server and client certificates.

func NewTestBaseContext

func NewTestBaseContext(user string) *base.Context

NewTestBaseContext creates a secure base context for user.

func SortStructs

func SortStructs(s interface{}, fieldName string)

SortStructs sorts the given slice of structs using the given field as the sort key.

func TransitiveImports

func TransitiveImports(importpath string, cgo bool) (map[string]struct{}, error)

TransitiveImports returns a set containing all of importpath's transitive dependencies.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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