testutil

package
v0.0.69 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDeploymentVersion = sha256.Sum256([]byte(sum256Seed))

DefaultDeploymentVersion provides consistent sha256 sum for initial Deployment.Version

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) types.Attribute

Attribute generates a random sdk.Attribute

func Attributes

func Attributes(t testing.TB) []types.Attribute

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 Deployment

func Deployment(t testing.TB) dtypes.Deployment

Deployment generates a dtype.Deployment in state `DeploymentActive`

func DeploymentGroup

func DeploymentGroup(t testing.TB, did dtypes.DeploymentID, gseq uint32) dtypes.Group

DeploymentGroup generates a dtype.DepDeploymentGroup in state `GroupOpen` with a set of random required attributes

func DeploymentGroups

func DeploymentGroups(t testing.TB, did dtypes.DeploymentID, gseq uint32) []dtypes.Group

DeploymentGroups returns a set of deployment groups generated by DeploymentGroup

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 GroupSpec

func GroupSpec(t testing.TB) dtypes.GroupSpec

GroupSpec generator

func Key

func Key(t testing.TB) ed25519.PrivKey

func LeaseID

func LeaseID(t testing.TB) mtypes.LeaseID

func LeaseIDForAccount

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

func OrderID

func OrderID(t testing.TB) mtypes.OrderID

func OrderIDForAccount

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

func ParseDeploymentEvent

func ParseDeploymentEvent(t testing.TB, events []abci.Event) sdkutil.ModuleEvent

func ParseEvent

func ParseEvent(t testing.TB, events []abci.Event) sdkutil.Event

func ParseMarketEvent

func ParseMarketEvent(t testing.TB, events []abci.Event) sdkutil.ModuleEvent

func ParseProviderEvent

func ParseProviderEvent(t testing.TB, events []abci.Event) sdkutil.ModuleEvent

func PlacementRequirements

func PlacementRequirements(t testing.TB) types.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 RandStorageQuantity

func RandStorageQuantity() uint64

func Resources

func Resources(_ testing.TB) types.Resources

func ResourcesList

func ResourcesList(t testing.TB, startID uint32) dtypes.ResourceUnits

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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