Documentation ¶
Index ¶
- Constants
- Variables
- func AccAddress(t testing.TB) sdk.AccAddress
- func AkashCoin(t testing.TB, amount int64) sdk.Coin
- func AkashCoinRandom(t testing.TB) sdk.Coin
- func AkashDecCoin(t testing.TB, amount int64) sdk.DecCoin
- func AkashDecCoinRandom(t testing.TB) sdk.DecCoin
- func Attribute(t testing.TB) types.Attribute
- func Attributes(t testing.TB) []types.Attribute
- func AuditedProvider(t testing.TB) (atypes.ProviderID, atypes.Provider)
- func BidID(t testing.TB) mtypes.BidID
- func BidIDForAccount(t testing.TB, owner, provider sdk.Address) mtypes.BidID
- func CertificateRequireEqualResponse(t *testing.T, cert TestCertificate, resp types.CertificateResponse, ...)
- func ChannelWaitForClose(t *testing.T, waitOn interface{})
- func ChannelWaitForCloseUpTo(t *testing.T, waitOn interface{}, waitFor time.Duration)
- func ChannelWaitForValue(t *testing.T, waitOn interface{}) interface{}
- func ChannelWaitForValueUpTo(t *testing.T, waitOn interface{}, waitFor time.Duration) interface{}
- func Coin(t testing.TB) sdk.Coin
- func DecCoin(t testing.TB) sdk.DecCoin
- func DefaultConfig() network.Config
- func Deployment(t testing.TB) dtypes.Deployment
- func DeploymentGroup(t testing.TB, did dtypes.DeploymentID, gseq uint32) dtypes.Group
- func DeploymentGroups(t testing.TB, did dtypes.DeploymentID, gseq uint32) []dtypes.Group
- func DeploymentID(t testing.TB) dtypes.DeploymentID
- func DeploymentIDForAccount(t testing.TB, addr sdk.Address) dtypes.DeploymentID
- func DeploymentVersion(t testing.TB) []byte
- func GroupID(t testing.TB) dtypes.GroupID
- func GroupIDForAccount(t testing.TB, addr sdk.Address) dtypes.GroupID
- func GroupSpec(t testing.TB) dtypes.GroupSpec
- func Hostname(t testing.TB) string
- func Key(t testing.TB) ed25519.PrivKey
- func Keyring(t testing.TB) keyring.Keyring
- func LeaseID(t testing.TB) mtypes.LeaseID
- func LeaseIDForAccount(t testing.TB, owner, provider sdk.Address) mtypes.LeaseID
- func Logger(t testing.TB) log.Logger
- func Name(_ testing.TB, prefix string) string
- func NewApp(val network.Validator) servertypes.Application
- func OrderID(t testing.TB) mtypes.OrderID
- func OrderIDForAccount(t testing.TB, addr sdk.Address) mtypes.OrderID
- func ParseDeploymentEvent(t testing.TB, events []abci.Event) sdkutil.ModuleEvent
- func ParseEvent(t testing.TB, events []abci.Event) sdkutil.Event
- func ParseMarketEvent(t testing.TB, events []abci.Event) sdkutil.ModuleEvent
- func ParseProviderEvent(t testing.TB, events []abci.Event) sdkutil.ModuleEvent
- func PlacementRequirements(t testing.TB) types.PlacementRequirements
- func Provider(t testing.TB) ptypes.Provider
- func ProviderHostname(t testing.TB) string
- func RandCPUUnits() uint
- func RandMemoryQuantity() uint64
- func RandRangeInt(min, max int) int
- func RandRangeUint(min, max uint) uint
- func RandRangeUint64(min, max uint64) uint64
- func RandStorageQuantity() uint64
- func ResourceUnits(_ testing.TB) types.ResourceUnits
- func Resources(t testing.TB) []dtypes.Resource
- type CertificateOption
- type NetworkTestSuite
- func (nts *NetworkTestSuite) Config() sdknetworktest.Config
- func (nts *NetworkTestSuite) Context(idxT ...int) sdkclient.Context
- func (nts *NetworkTestSuite) ContextForTest() sdkclient.Context
- func (nts *NetworkTestSuite) GoContextForTest() context.Context
- func (nts *NetworkTestSuite) Network() *sdknetworktest.Network
- func (nts *NetworkTestSuite) SetupSuite()
- func (nts *NetworkTestSuite) SetupTest()
- func (nts *NetworkTestSuite) TearDownSuite()
- func (nts *NetworkTestSuite) TearDownTest()
- func (nts *NetworkTestSuite) ValidateTx(resultData []byte) string
- func (nts *NetworkTestSuite) Validator(idxT ...int) *sdknetworktest.Validator
- func (nts *NetworkTestSuite) WalletForTest() sdk.AccAddress
- func (nts *NetworkTestSuite) WalletNameForTest() string
- type TestCertificate
Constants ¶
const ( CoinDenom = "uakt" BechPrefix = "akash" )
CoinDenom provides ability to create coins in test functions and pass them into testutil functionality.
Variables ¶
var DefaultDeploymentVersion = sha256.Sum256([]byte(sum256Seed))
DefaultDeploymentVersion provides consistent sha256 sum for initial Deployment.Version
Functions ¶
func AccAddress ¶ added in v0.22.0
func AccAddress(t testing.TB) sdk.AccAddress
AccAddress provides an Account's Address bytes from a ed25519 generated private key.
func AkashCoinRandom ¶ added in v0.22.0
AkashCoin provides simple interface to the Akash sdk.Coin type.
func Attributes ¶ added in v0.22.0
Attributes generates a set of sdk.Attribute
func AuditedProvider ¶ added in v0.22.0
func BidIDForAccount ¶ added in v0.22.0
func CertificateRequireEqualResponse ¶ added in v0.22.0
func CertificateRequireEqualResponse(t *testing.T, cert TestCertificate, resp types.CertificateResponse, state types.Certificate_State)
func ChannelWaitForClose ¶ added in v0.22.0
func ChannelWaitForCloseUpTo ¶ added in v0.22.0
func ChannelWaitForValue ¶ added in v0.22.0
func ChannelWaitForValueUpTo ¶ added in v0.22.0
func DefaultConfig ¶ added in v0.22.0
DefaultConfig returns a default configuration suitable for nearly all testing requirements.
func Deployment ¶
func Deployment(t testing.TB) dtypes.Deployment
Deployment generates a dtype.Deployment in state `DeploymentActive`
func DeploymentGroup ¶ added in v0.3.0
DeploymentGroup generates a dtype.DepDeploymentGroup in state `GroupOpen` with a set of random required attributes
func DeploymentGroups ¶ added in v0.0.2
DeploymentGroups returns a set of deployment groups generated by DeploymentGroup
func DeploymentID ¶ added in v0.22.0
func DeploymentID(t testing.TB) dtypes.DeploymentID
func DeploymentIDForAccount ¶ added in v0.22.0
func DeploymentVersion ¶ added in v0.22.0
DeploymentVersion provides a random sha256 sum for simulating Deployments.
func GroupIDForAccount ¶ added in v0.22.0
func LeaseIDForAccount ¶ added in v0.22.0
func NewApp ¶
func NewApp(val network.Validator) servertypes.Application
func OrderIDForAccount ¶ added in v0.22.0
func ParseDeploymentEvent ¶ added in v0.22.0
func ParseMarketEvent ¶ added in v0.22.0
func ParseProviderEvent ¶ added in v0.22.0
func PlacementRequirements ¶ added in v0.22.0
func PlacementRequirements(t testing.TB) types.PlacementRequirements
PlacementRequirements generates placement requirements
func ProviderHostname ¶ added in v0.22.0
func RandCPUUnits ¶ added in v0.22.0
func RandCPUUnits() uint
func RandMemoryQuantity ¶ added in v0.22.0
func RandMemoryQuantity() uint64
func RandRangeInt ¶ added in v0.22.0
func RandRangeUint ¶ added in v0.22.0
func RandRangeUint64 ¶ added in v0.22.0
func RandStorageQuantity ¶ added in v0.22.0
func RandStorageQuantity() uint64
func ResourceUnits ¶ added in v0.22.0
func ResourceUnits(_ testing.TB) types.ResourceUnits
Types ¶
type CertificateOption ¶ added in v0.22.0
type CertificateOption func(*certificateOption)
func CertificateOptionDomains ¶ added in v0.22.0
func CertificateOptionDomains(domains []string) CertificateOption
func CertificateOptionMocks ¶ added in v0.22.0
func CertificateOptionMocks(val *mocks.QueryClient) CertificateOption
func CertificateOptionNotAfter ¶ added in v0.22.0
func CertificateOptionNotAfter(tm time.Time) CertificateOption
func CertificateOptionNotBefore ¶ added in v0.22.0
func CertificateOptionNotBefore(tm time.Time) CertificateOption
type NetworkTestSuite ¶ added in v0.22.0
func NewNetworkTestSuite ¶ added in v0.22.0
func NewNetworkTestSuite(cfg *sdknetworktest.Config, container interface{}) NetworkTestSuite
func (*NetworkTestSuite) Config ¶ added in v0.22.0
func (nts *NetworkTestSuite) Config() sdknetworktest.Config
func (*NetworkTestSuite) Context ¶ added in v0.22.0
func (nts *NetworkTestSuite) Context(idxT ...int) sdkclient.Context
func (*NetworkTestSuite) ContextForTest ¶ added in v0.22.0
func (nts *NetworkTestSuite) ContextForTest() sdkclient.Context
func (*NetworkTestSuite) GoContextForTest ¶ added in v0.22.0
func (nts *NetworkTestSuite) GoContextForTest() context.Context
func (*NetworkTestSuite) Network ¶ added in v0.22.0
func (nts *NetworkTestSuite) Network() *sdknetworktest.Network
func (*NetworkTestSuite) SetupSuite ¶ added in v0.22.0
func (nts *NetworkTestSuite) SetupSuite()
func (*NetworkTestSuite) SetupTest ¶ added in v0.22.0
func (nts *NetworkTestSuite) SetupTest()
func (*NetworkTestSuite) TearDownSuite ¶ added in v0.22.0
func (nts *NetworkTestSuite) TearDownSuite()
func (*NetworkTestSuite) TearDownTest ¶ added in v0.22.0
func (nts *NetworkTestSuite) TearDownTest()
func (*NetworkTestSuite) ValidateTx ¶ added in v0.22.0
func (nts *NetworkTestSuite) ValidateTx(resultData []byte) string
func (*NetworkTestSuite) Validator ¶ added in v0.22.0
func (nts *NetworkTestSuite) Validator(idxT ...int) *sdknetworktest.Validator
func (*NetworkTestSuite) WalletForTest ¶ added in v0.22.0
func (nts *NetworkTestSuite) WalletForTest() sdk.AccAddress
func (*NetworkTestSuite) WalletNameForTest ¶ added in v0.22.0
func (nts *NetworkTestSuite) WalletNameForTest() string
type TestCertificate ¶ added in v0.22.0
type TestCertificate struct { Cert []tls.Certificate Serial big.Int PEM struct { Cert []byte Priv []byte Pub []byte } }
func Certificate ¶ added in v0.22.0
func Certificate(t testing.TB, addr sdk.Address, opts ...CertificateOption) TestCertificate