testutil

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2018 License: Apache-2.0 Imports: 25 Imported by: 2

Documentation

Index

Constants

View Source
const (
	KeyPasswd = "0123456789"
	KeyAlgo   = "ed25519"
	KeyName   = "test"
)

Variables

This section is empty.

Functions

func Address added in v0.0.3

func Address(t *testing.T) []byte

func AfterThreadStart added in v0.0.7

func AfterThreadStart(t *testing.T) <-chan time.Time

func CloseDeployment added in v0.0.2

func CloseDeployment(t *testing.T, st state.State, app apptypes.Application, deployment *base.Bytes, key crypto.PrivKey)

func CloseFulfillment added in v0.0.4

func CloseFulfillment(t *testing.T, st state.State, app apptypes.Application, key crypto.PrivKey, fulfillment *types.Fulfillment)

func CloseLease added in v0.0.5

func CloseLease(t *testing.T, st state.State, app apptypes.Application, id types.LeaseID, key crypto.PrivKey)

func CreateAccount

func CreateAccount(t *testing.T, state state.State) (*types.Account, crypto.PrivKey)

func CreateDeployment

func CreateDeployment(t *testing.T, st state.State, app apptypes.Application, account *types.Account, key crypto.PrivKey, nonce uint64) (*types.Deployment, *types.DeploymentGroups)

func CreateFulfillment

func CreateFulfillment(t *testing.T, st state.State, app apptypes.Application, provider base.Bytes, key crypto.PrivKey, deployment base.Bytes, group, order uint64, price uint32) *types.Fulfillment

func CreateLease

func CreateLease(t *testing.T, st state.State, app apptypes.Application, provider base.Bytes, key crypto.PrivKey, deployment base.Bytes, group, order uint64, price uint32) *types.Lease

func CreateOrder

func CreateOrder(t *testing.T, st state.State, app apptypes.Application, account *types.Account, key crypto.PrivKey, deploymentAddress base.Bytes, groupSeq, orderSeq uint64) *types.Order

func CreateProvider

func CreateProvider(t *testing.T, st state.State, app apptypes.Application, account *types.Account, key crypto.PrivKey, nonce uint64) *types.Provider

func Deployment

func Deployment(tenant base.Bytes, nonce uint64, version ...[]byte) *types.Deployment

func DeploymentAddress added in v0.0.3

func DeploymentAddress(t *testing.T) []byte

func DeploymentGroups added in v0.0.2

func DeploymentGroups(deployment base.Bytes, nonce uint64) *types.DeploymentGroups

func Fulfillment

func Fulfillment(provider base.Bytes, deplyment base.Bytes, group, order uint64, price uint32) *types.Fulfillment

func HexAddress added in v0.0.3

func HexAddress(t *testing.T) string

func HexDeploymentAddress added in v0.0.3

func HexDeploymentAddress(t *testing.T) string

func KeyManager

func KeyManager(t *testing.T) keys.Keybase

func Lease

func Lease(provider base.Bytes, deplyment base.Bytes, group, order uint64, price uint32) *types.Lease

func Logger

func Logger() log.Logger

func NewApp

func NewApp(t *testing.T, gen *types.Genesis) tmtypes.Application

func NewNamedKey

func NewNamedKey(t *testing.T) (keys.Info, keys.Keybase)

func NewState

func NewState(t *testing.T, gen *types.Genesis) (state.CommitState, state.CacheState)

NewState used only for testing

func Order

func Order(deploymentAddress base.Bytes, groupSeq, orderSeq uint64) *types.Order

func PrivateKey

func PrivateKey(t *testing.T) crypto.PrivKey

func PrivateKeySigner

func PrivateKeySigner(t *testing.T) (txutil.Signer, crypto.PrivKey)

func Provider

func Provider(account base.Bytes, nonce uint64) *types.Provider

func ProviderTx

func ProviderTx(account *types.Account, key crypto.PrivKey, nonce uint64) *types.Tx

func PublicKey added in v0.0.3

func PublicKey(t *testing.T) crypto.PubKey

func RandUint32

func RandUint32() uint32

func RandUint64

func RandUint64() uint64

func Shrug added in v0.0.3

func Shrug(t *testing.T, issue int)

func Signer added in v0.0.6

func Signer(t *testing.T, kmgr keys.Keybase) txutil.Signer

func SleepForThreadStart

func SleepForThreadStart(t *testing.T)

func TMConfig

func TMConfig(t *testing.T, basedir string) *tmconfig.Config

func TempDir

func TempDir(t *testing.T) string

func WithAkashDir added in v0.0.3

func WithAkashDir(t *testing.T, fn func(string))

func WithTempDir added in v0.0.3

func WithTempDir(t *testing.T, fn func(string))

func WithTempDirEnv added in v0.0.3

func WithTempDirEnv(t *testing.T, key string, fn func(string))

Types

This section is empty.

Jump to

Keyboard shortcuts

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