testonly

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestLog

type TestLog struct {
	// Root is the path to the directory which contains the log data.
	Root string
	// SigVerifier can verify log signatures on its checkpoints.
	SigVerifier note.Verifier
	// LogReader reads from the log storage directly.
	LogReader tessera.LogReader
	// Appender provides access to the Appender lifecycle mode for this log.
	Appender *tessera.Appender
}

TestLog represents an ephemeral POSIX log instance intended for use in tests.

func NewTestLog

func NewTestLog(t *testing.T, opts *tessera.AppendOptions) (*TestLog, func(context.Context) error)

NewTestLog creates a temporary POSIX log instance in Appender mode with the provided options.

This log will be rooted in a temporary directory which will be automatically removed by the testing package after use.

Returns an instance of TestLog containing the various structures created, and a shutdown function which MUST be called when the test has finished with the log.

Jump to

Keyboard shortcuts

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