testutil

package
v0.0.1-rc10 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CoinDenom = "uakt"
)

CoinDenom provides ability to create coins in test functions and pass them into testutil functionality.

Variables

This section is empty.

Functions

func AccAddress

func AccAddress(t testing.TB) sdk.AccAddress

AccAddress provides an Account's Address bytes from a ed25519 generated private key.

func Attribute

func Attribute(t testing.TB) attrv1.Attribute

Attribute generates a random sdk.Attribute

func Attributes

func Attributes(t testing.TB) attrv1.Attributes

Attributes generates a set of sdk.Attribute

func BidID

func BidID(t testing.TB) mtypes.BidID

func BidIDForAccount

func BidIDForAccount(t testing.TB, owner, provider sdk.Address) mtypes.BidID

func DeploymentID

func DeploymentID(t testing.TB) dtypes.DeploymentID

func DeploymentIDForAccount

func DeploymentIDForAccount(t testing.TB, addr sdk.Address) dtypes.DeploymentID

func DeploymentVersion

func DeploymentVersion(t testing.TB) []byte

DeploymentVersion provides a random sha256 sum for simulating Deployments.

func GroupID

func GroupID(t testing.TB) dtypes.GroupID

func GroupIDForAccount

func GroupIDForAccount(t testing.TB, addr sdk.Address) dtypes.GroupID

func Hostname

func Hostname(t testing.TB) string

Hostname generates a random hostname with a "test.com" domain

func Key

func Key(t testing.TB) ed25519.PrivKey

func Keyring

func Keyring(t testing.TB, cdc codec.Codec) keyring.Keyring

func LeaseID

func LeaseID(t testing.TB) mtypes.LeaseID

func LeaseIDForAccount

func LeaseIDForAccount(t testing.TB, owner, provider sdk.Address) mtypes.LeaseID

func Name

func Name(_ testing.TB, prefix string) string

Name generates a random name with the given prefix

func OrderID

func OrderID(t testing.TB) mtypes.OrderID

func OrderIDForAccount

func OrderIDForAccount(t testing.TB, addr sdk.Address) mtypes.OrderID

func PlacementRequirements

func PlacementRequirements(t testing.TB) attrv1.PlacementRequirements

PlacementRequirements generates placement requirements

func Provider

func Provider(t testing.TB) ptypes.Provider

func ProviderHostname

func ProviderHostname(t testing.TB) string

func RandCPUUnits

func RandCPUUnits() uint

func RandGPUUnits

func RandGPUUnits() uint

func RandMemoryQuantity

func RandMemoryQuantity() uint64

func RandRangeInt

func RandRangeInt(min, max int) int

func RandRangeUint

func RandRangeUint(min, max uint) uint

func RandRangeUint64

func RandRangeUint64(min, max uint64) uint64

func RandStorageQuantity

func RandStorageQuantity() uint64

func ResourceUnits

func ResourceUnits(_ testing.TB) rtypes.Resources

func Resources

func Resources(t testing.TB) dtypes.ResourceUnits

Resources produces an attribute list for populating a Group's 'Resources' fields.

Types

type ConfigOption

type ConfigOption func(*networkConfigOptions)

func WithInterceptState

func WithInterceptState(val InterceptState) ConfigOption

WithInterceptState set custom name of the log object

type InterceptState

type InterceptState func(codec.Codec, string, json.RawMessage) json.RawMessage

Jump to

Keyboard shortcuts

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