Documentation ¶
Overview ¶
Package integration provides test-only code for performing integrated tests of Trillian functionality.
Index ¶
- Variables
- func NewRegistryForTests(ctx context.Context) (extension.Registry, error)
- type LogEnv
- func NewLogEnv(ctx context.Context, numSequencers int, _ string) (*LogEnv, error)
- func NewLogEnvWithGRPCOptions(ctx context.Context, numSequencers int, serverOpts []grpc.ServerOption, ...) (*LogEnv, error)
- func NewLogEnvWithRegistry(ctx context.Context, numSequencers int, registry extension.Registry) (*LogEnv, error)
- func NewLogEnvWithRegistryAndGRPCOptions(ctx context.Context, numSequencers int, registry extension.Registry, ...) (*LogEnv, error)
- type MapEnv
Constants ¶
This section is empty.
Variables ¶
var ( // SequencerInterval is the time between runs of the sequencer. SequencerInterval = 500 * time.Millisecond )
Functions ¶
Types ¶
type LogEnv ¶
type LogEnv struct { LogOperation server.LogOperation Sequencer *server.LogOperationManager ClientConn *grpc.ClientConn // TODO(gbelvin): Deprecate. Address string Log trillian.TrillianLogClient Admin trillian.TrillianAdminClient DB *sql.DB // contains filtered or unexported fields }
LogEnv is a test environment that contains both a log server and a connection to it.
func NewLogEnv ¶
NewLogEnv creates a fresh DB, log server, and client. The numSequencers parameter indicates how many sequencers to run in parallel; if numSequencers is zero a manually-controlled test sequencer is used. TODO(codingllama): Remove 3rd parameter (need to coordinate with github.com/google/certificate-transparency-go)
func NewLogEnvWithGRPCOptions ¶ added in v1.0.5
func NewLogEnvWithGRPCOptions(ctx context.Context, numSequencers int, serverOpts []grpc.ServerOption, clientOpts []grpc.DialOption) (*LogEnv, error)
NewLogEnvWithGRPCOptions works the same way as NewLogEnv, but allows callers to also set additional grpc.ServerOption and grpc.DialOption values.
func NewLogEnvWithRegistry ¶
func NewLogEnvWithRegistry(ctx context.Context, numSequencers int, registry extension.Registry) (*LogEnv, error)
NewLogEnvWithRegistry uses the passed in Registry to create a log server, and client. The numSequencers parameter indicates how many sequencers to run in parallel; if numSequencers is zero a manually-controlled test sequencer is used.
func NewLogEnvWithRegistryAndGRPCOptions ¶ added in v1.0.5
func NewLogEnvWithRegistryAndGRPCOptions(ctx context.Context, numSequencers int, registry extension.Registry, serverOpts []grpc.ServerOption, clientOpts []grpc.DialOption) (*LogEnv, error)
NewLogEnvWithRegistryAndGRPCOptions works the same way as NewLogEnv, but allows callers to also set additional grpc.ServerOption and grpc.DialOption values.
type MapEnv ¶
type MapEnv struct { // Objects that need Close(), in order of creation. DB *sql.DB // Public fields Map trillian.TrillianMapClient Admin trillian.TrillianAdminClient // contains filtered or unexported fields }
MapEnv is a map server and connected client.
func NewMapEnvFromConn ¶
NewMapEnvFromConn connects to a map server.
func NewMapEnvWithRegistry ¶
NewMapEnvWithRegistry uses the passed in Registry to create a map server and client.