testutil

package
v0.0.0-...-0f7fa19 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Alice, _ = ed25519.Parse("MgCZT5vOnYZoVAeyjnzuJIVY9J4LNtJ+f8Js0cTPuKUpFnQ==")

did:key:z6Mkk89bC3JrVqKie71YEcc5M1SMVxuCgNx6zLZ8SYJsxALi

View Source
var Bob, _ = ed25519.Parse("MgCYbj5AJfVvdrjkjNCxB3iAUwx7RQHVQ7H1sKyHy46IosQ==")

did:key:z6MkffDZCkCTWreg8868fG1FGFogcJj5X6PY93pPcWDn9bob

View Source
var Carol, _ = ed25519.Parse("MgCa5pEVgZbqGILBFD3/TAd1a1OOJMuPsVz/uxS9ceU5jeg==")

did:key:z6MkwYkD48SUrPhQ5Sf8qk5L8FW2L32Ze4guLnZXY4DrDCAR

View Source
var Mallory, _ = ed25519.Parse("MgCYtH0AvYxiQwBG6+ZXcwlXywq9tI50G2mCAUJbwrrahkA==")

did:key:z6MktafZTREjJkvV5mfJxcLpNBoVPwDLhTuMg9ng7dY4zMAL

View Source
var Service, _ = ed25519.Parse("MgCZyxtpD6SFBcXCXUKPTkLrc2+RlmaBjL/tMgWCT3+MUlw==")

did:key:z6Mkk3mDiu74xxyYEff5X1p568fVqEMczj5keYPT8qVMNsVC

View Source
var TestURL, _ = url.Parse("https://test.storacha.network")
View Source
var WebService, _ = signer.Wrap(Service, webServiceDID)

did:web:test.storacha.network

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.

func RandomBytes

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

func RandomCID

func RandomCID(t *testing.T) cid.Cid

func RandomDID

func RandomDID(t *testing.T) did.DID

func RandomMultihash

func RandomMultihash(t *testing.T) mh.Multihash

func RandomSigner

func RandomSigner(t *testing.T) ed25519.Signer

Types

This section is empty.

Jump to

Keyboard shortcuts

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