package maptest

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

Index

Variables

var AllTests = TestTable{
	{"MapRevisionZero", RunMapRevisionZero},
	{"MapRevisionInvalid", RunMapRevisionInvalid},
	{"WriteLeavesRevision", RunWriteLeavesRevision},
	{"LeafHistory", RunLeafHistory},
	{"Inclusion", RunInclusion},
	{"InclusionBatch", RunInclusionBatch},
	{"RunGetLeafByRevisionNoProof", RunGetLeafByRevisionNoProof},
	{"WriteStress", RunWriteStress},
}

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 RunGetLeafByRevisionNoProof

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

RunGetLeafByRevisionNoProof fails the test if the map server does not respond correctly to a GetLeavesByRevision request.

func RunInclusion

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

func RunInclusionBatch

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

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

func RunMapRevisionInvalid

RunMapRevisionInvalid performs checks on Map APIs where revision takes illegal values.

func RunMapRevisionZero

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

func RunWriteLeavesRevision

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

RunWriteLeavesRevision checks Map WriteLeaves API with revision parameter used. TODO(pavelkalinnikov): Merge RunMapRevisionInvalid into this test.

func RunWriteStress

RunWriteStress performs stress checks on Trillian Map's SetLeaves call.

Types

type NamedTestFn

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.3.7
Published
Jan 16, 2020
Platform
js/wasm
Imports
14 packages
Last checked
2 hours ago

Tools for package owners.