testutils

package
v0.0.0-...-2c4dd60 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableLogging

func EnableLogging(t *testing.T)

func MakeBlobManifest

func MakeBlobManifest(length uint64, chunks ...blob.ManifestChunk) blob.Manifest

func RandomAddress

func RandomAddress(t *testing.T) types.Address

func RandomAsymEncPubkey

func RandomAsymEncPubkey(t *testing.T) *crypto.AsymEncPubkey

func RandomBytes

func RandomBytes(t *testing.T, length int) []byte

func RandomDuration

func RandomDuration(t *testing.T, max time.Duration) time.Duration

func RandomHash

func RandomHash(t *testing.T) types.Hash

func RandomIdentity

func RandomIdentity(t *testing.T) identity.Identity

func RandomSigningPublicKey

func RandomSigningPublicKey(t *testing.T) *crypto.SigningPublicKey

func RandomString

func RandomString(t *testing.T, n int) string

func RandomTime

func RandomTime(t *testing.T) time.Time

func ReadCloserFromString

func ReadCloserFromString(s string) io.ReadCloser

func SetupDBTree

func SetupDBTree(t *testing.T) *state.DBTree

func SetupDBTreeWithValue

func SetupDBTreeWithValue(t *testing.T, keypath state.Keypath, val interface{}) *state.DBTree

func SetupVersionedDBTree

func SetupVersionedDBTree(t *testing.T) *state.VersionedDBTree

func SetupVersionedDBTreeWithValue

func SetupVersionedDBTreeWithValue(t *testing.T, keypath state.Keypath, val interface{}) *state.VersionedDBTree

Types

type Awaiter

type Awaiter chan struct{}

func NewAwaiter

func NewAwaiter() Awaiter

func (Awaiter) AwaitOrFail

func (a Awaiter) AwaitOrFail(t testing.TB, params ...interface{})

func (Awaiter) ItHappened

func (a Awaiter) ItHappened()

func (Awaiter) NeverHappenedOrFail

func (a Awaiter) NeverHappenedOrFail(t testing.TB, params ...interface{})

Jump to

Keyboard shortcuts

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