maptest

package
v1.3.12 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 added in v1.3.0

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 added in v1.0.5

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 added in v1.3.0

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 added in v1.3.0

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.

Jump to

Keyboard shortcuts

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