testutil

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Alice, _ = signer.Parse("MgCZT5vOnYZoVAeyjnzuJIVY9J4LNtJ+f8Js0cTPuKUpFne0BVEDJjEu6quFIU8yp91/TY/+MYK8GvlKoTDnqOCovCVM=")

did:key:z6Mkk89bC3JrVqKie71YEcc5M1SMVxuCgNx6zLZ8SYJsxALi

View Source
var Bob, _ = signer.Parse("MgCYbj5AJfVvdrjkjNCxB3iAUwx7RQHVQ7H1sKyHy46Iose0BEevXgL1V73PD9snOCIoONgb+yQ9sycYchQC8kygR4qY=")

did:key:z6MkffDZCkCTWreg8868fG1FGFogcJj5X6PY93pPcWDn9bob

View Source
var Mallory, _ = signer.Parse("MgCYtH0AvYxiQwBG6+ZXcwlXywq9tI50G2mCAUJbwrrahkO0B0elFYkl3Ulf3Q3A/EvcVY0utb4etiSE8e6pi4H0FEmU=")

did:key:z6MktafZTREjJkvV5mfJxcLpNBoVPwDLhTuMg9ng7dY4zMAL

View Source
var Service, _ = signer.Parse("MgCYKXoHVy7Vk4/QjcEGi+MCqjntUiasxXJ8uJKY0qh11e+0Bs8WsdqGK7xothgrDzzWD0ME7ynPjz2okXDh8537lId8=")

did:key:z6MkrZ1r5XBFZjBU34qyD8fueMbMRkKw17BZaq2ivKFjnz2z

View Source
var TestURL, _ = url.Parse("https://storacha.network")

Functions

func BindFailure

func BindFailure(t testing.TB, n ipld.Node) fdm.FailureModel

BindFailure binds the IPLD node to a FailureModel if possible. This works around IPLD requiring data to match the schema exactly

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.

func RandomBytes

func RandomBytes(size int) []byte

func RandomCID

func RandomCID() datamodel.Link

func RandomDID

func RandomDID() did.DID

func RandomMultihash

func RandomMultihash() mh.Multihash

func RandomSigner

func RandomSigner() principal.Signer

func RequireEqualDelegation

func RequireEqualDelegation(t *testing.T, expected delegation.Delegation, actual delegation.Delegation)

RequireEqualDelegation compares two delegations to verify their equality

Types

This section is empty.

Jump to

Keyboard shortcuts

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