integration

package
v0.0.0-...-9be813a Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNewOutgoingContextWithFakeAuth

func GetNewOutgoingContextWithFakeAuth(userID string) context.Context

GetNewOutgoingContextWithFakeAuth returns a new context containing FakeAuth information to authenticate userID

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 Env

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

	Factory *transaction.Factory
	Cli     pb.KeyTransparencyClient
	Domain  *pb.Domain
	// 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