integration

package
v0.0.0-...-02c3ccb Latest Latest
Warning

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

Go to latest
Published: May 22, 2017 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(t testing.TB) (string, net.Listener)

Listen opens a random local port and listens on it.

func NewDB

func NewDB(t testing.TB) *sql.DB

NewDB creates a new in-memory database for testing.

Types

type DevZero

type DevZero struct{}

DevZero is an io.Reader that returns 0's

func (DevZero) Read

func (DevZero) Read(b []byte) (n int, err error)

Read returns 0's

type Env

type Env struct {
	GRPCServer *grpc.Server
	V2Server   *keyserver.Server
	Conn       *grpc.ClientConn
	Client     *grpcc.Client
	Signer     *signer.Signer

	Factory *transaction.Factory
	VrfPriv vrf.PrivateKey
	Cli     pb.KeyTransparencyServiceClient
	// contains filtered or unexported fields
}

Env holds a complete testing environment for end-to-end tests.

func NewEnv

func NewEnv(t *testing.T) *Env

NewEnv sets up common resources for tests.

func (*Env) Close

func (env *Env) Close(t *testing.T)

Close releases resources allocated by NewEnv.

Jump to

Keyboard shortcuts

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