testtools

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Intn

func Intn(t *testing.T, min, max int64) int64

Intn returns a random number between min and max.

func RandomBytes

func RandomBytes(t *testing.T, min, max int64) []byte

Types

type TestAuditEncoder

type TestAuditEncoder struct {
	// Ctx is a context.Context that is checked before writing to
	// the events channel.
	//
	//nolint
	Ctx context.Context

	// Events is written to when Encode is called.
	Events chan<- *auditevent.AuditEvent

	// T is the current test's testing.T.
	T *testing.T

	// Err is an optional error that is returned when Encode is
	// called (only if Err is non-nil).
	Err error
}

TestAuditEncoder implements auditevent.EventEncoder for testing purposes.

func (TestAuditEncoder) Encode

func (o TestAuditEncoder) Encode(i interface{}) error

Jump to

Keyboard shortcuts

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