testutil

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

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Alice = multikey.KeyIssuer(alice)

	Bob = multikey.KeyIssuer(bob)

	Carol = multikey.KeyIssuer(carol)

	Mallory = multikey.KeyIssuer(mallory)

	Service = multikey.KeyIssuer(service)

	WebService       = multikey.NewIssuer(webServiceDID, service)
	WebServiceSigner = service

	TestURL, _ = url.Parse("https://test.storacha.network")
)
View Source
var (
	RandomBytes          = testutil.RandomBytes
	RandomCID            = testutil.RandomCID
	RandomDigest         = testutil.RandomDigest
	RandomDID            = testutil.RandomDID
	RandomSigner         = testutil.RandomSigner
	RandomIssuer         = testutil.RandomIssuer
	RandomMultikeySigner = testutil.RandomMultikeySigner
	RandomMultikeyIssuer = testutil.RandomMultikeyIssuer
	RandomPrincipal      = testutil.RandomPrincipal

	// Deprecated alias for RandomDigest, which is a more accurate name.
	RandomMultihash = testutil.RandomDigest
)

Functions

func Must

func Must[T any](val T, err error) func(*testing.T) T

Must takes return values from a function and returns the non-error one. If the error value is non-nil then it fails the test

func Must2

func Must2[T, U any](val1 T, val2 U, err error) func(*testing.T) (T, U)

Must2 takes return values from a 3 return function and returns the non-error ones. If the error value is non-nil then it fails the test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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