package maptest

import "github.com/google/trillian/integration/maptest"

Index

Variables

var AllTests = TestTable{
	{"MapRevisionZero", RunMapRevisionZero},
	{"LeafHistory", RunLeafHistory},
	{"Inclusion", RunInclusion},
	{"InclusionBatch", RunInclusionBatch},
}

AllTests is the TestTable containing all the trillian Map 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 RunInclusion

func RunInclusion(ctx context.Context, t *testing.T, tadmin trillian.TrillianAdminClient, tmap trillian.TrillianMapClient)

RunInclusion performs checks on Trillian Map inclusion proofs after setting and getting leafs, for a variety of hash strategies.

func RunInclusionBatch

func RunInclusionBatch(ctx context.Context, t *testing.T, tadmin trillian.TrillianAdminClient, tmap trillian.TrillianMapClient)

RunInclusionBatch performs checks on Trillian Map inclusion proofs, after setting and getting leafs in larger batches, checking also the SignedMapRoot revisions along the way, for a variety of hash strategies.

func RunLeafHistory

func RunLeafHistory(ctx context.Context, t *testing.T, tadmin trillian.TrillianAdminClient, tmap trillian.TrillianMapClient)

RunLeafHistory performs checks on Trillian Map leaf updates under a variety of Hash Strategies.

func RunMapRevisionZero

func RunMapRevisionZero(ctx context.Context, t *testing.T, tadmin trillian.TrillianAdminClient, tmap trillian.TrillianMapClient)

RunMapRevisionZero performs checks on Trillian Map behavior for new, empty maps.

Types

type NamedTestFn

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

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

type TestTable

type TestTable []NamedTestFn

TestTable is a collection of NamedTestFns.

Source Files

map.go

Version
v1.0.4
Published
Dec 5, 2017
Platform
js/wasm
Imports
16 packages
Last checked
4 hours ago

Tools for package owners.