integration

package
v0.0.0-...-b1763eb Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2018 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package integration exports a set of unit tests that can be run by impl/integration or any other specific instantiation of KeyTransparency.

Index

Constants

This section is empty.

Variables

View Source
var AllTests = []NamedTestFn{

	{"TestEmptyGetAndUpdate", TestEmptyGetAndUpdate},
	{"TestUpdateValidation", TestUpdateValidation},
	{"TestListHistory", TestListHistory},

	{"TestMonitor", TestMonitor},
}

AllTests contains all the integration tests. Be sure to extend this when additional tests are added. This is done so that tests can be run in different environments in a portable way.

Functions

func TestEmptyGetAndUpdate

func TestEmptyGetAndUpdate(ctx context.Context, env *Env, t *testing.T)

TestEmptyGetAndUpdate verifies set/get semantics.

func TestListHistory

func TestListHistory(ctx context.Context, env *Env, t *testing.T)

TestListHistory verifies that repeated history values get collapsed properly.

func TestMonitor

func TestMonitor(ctx context.Context, env *Env, t *testing.T)

TestMonitor verifies that the monitor correctly verifies transitions between epochs.

func TestUpdateValidation

func TestUpdateValidation(ctx context.Context, env *Env, t *testing.T)

TestUpdateValidation verifies the correctness of updates submitted by the client.

func WithOutgoingFakeAuth

func WithOutgoingFakeAuth(ctx context.Context, userID string) context.Context

WithOutgoingFakeAuth returns a ctx with FakeAuth information for userID.

Types

type Env

type Env struct {
	Client   *grpcc.Client
	Cli      pb.KeyTransparencyClient
	Domain   *pb.Domain
	Receiver mutator.Receiver
}

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

type NamedTestFn

type NamedTestFn struct {
	Name string
	Fn   func(context.Context, *Env, *testing.T)
}

NamedTestFn is a binding between a readable test name (used for a Go subtest) and a function that performs the test, given a test environment.

Jump to

Keyboard shortcuts

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