testutil

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: Apache-2.0 Imports: 26 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestBfuryDenoms = []string{
	"bfury-furyvaloper15gqc744d05xacn4n6w2furuads9fu4pq7c8fhj",
	"bfury-furyvaloper15qdefkmwswysgg4qxgqpqr35k3m49pkx2xjwrh",
	"bfury-furyvaloper1ypjp0m04pyp73hwgtc0dgkx0e9rrydecmmtjay",
}

Functions

This section is empty.

Types

type Suite

type Suite struct {
	suite.Suite
	Keeper        keeper.Keeper
	App           app.TestApp
	Ctx           sdk.Context
	BankKeeper    bankkeeper.Keeper
	AccountKeeper authkeeper.AccountKeeper

	// Strategy Keepers
	JinxKeeper    jinxkeeper.Keeper
	SavingsKeeper savingskeeper.Keeper
}

Suite implements a test suite for the earn module integration tests

func (*Suite) AccountBalanceEqual

func (suite *Suite) AccountBalanceEqual(addr sdk.AccAddress, coins sdk.Coins)

AccountBalanceEqual asserts that the coins match the account balance

func (*Suite) AddCoinsToModule

func (suite *Suite) AddCoinsToModule(amount sdk.Coins)

AddCoinsToModule adds coins to the earn module account

func (*Suite) CreateAccount

func (suite *Suite) CreateAccount(initialBalance sdk.Coins, index int) authtypes.AccountI

CreateAccount creates a new account from the provided balance, using index to create different new addresses.

func (*Suite) CreateDelegation

func (suite *Suite) CreateDelegation(valAddr sdk.ValAddress, delegator sdk.AccAddress, amount sdkmath.Int) sdk.Dec

CreateDelegation delegates tokens to a validator.

func (*Suite) CreateNewUnbondedValidator

func (suite *Suite) CreateNewUnbondedValidator(addr sdk.ValAddress, selfDelegation sdkmath.Int) stakingtypes.Validator

CreateNewUnbondedValidator creates a new validator in the staking module. New validators are unbonded until the end blocker is run.

func (*Suite) CreateVault

func (suite *Suite) CreateVault(
	vaultDenom string,
	vaultStrategies types.StrategyTypes,
	isPrivateVault bool,
	allowedDepositors []sdk.AccAddress,
)

CreateVault adds a new vault to the keeper parameters

func (*Suite) EventsContains

func (suite *Suite) EventsContains(events sdk.Events, expectedEvent sdk.Event)

EventsContains asserts that the expected event is in the provided events

func (*Suite) GetEvents

func (suite *Suite) GetEvents() sdk.Events

GetEvents returns emitted events on the sdk context

func (*Suite) JinxDepositAmountEqual

func (suite *Suite) JinxDepositAmountEqual(expected sdk.Coins)

JinxDepositAmountEqual asserts that the jinx deposit amount matches the provided values.

func (*Suite) ModuleAccountBalanceEqual

func (suite *Suite) ModuleAccountBalanceEqual(coins sdk.Coins)

ModuleAccountBalanceEqual asserts that the earn module account balance matches the provided coins

func (*Suite) NewAccountFromAddr

func (suite *Suite) NewAccountFromAddr(addr sdk.AccAddress, balance sdk.Coins) authtypes.AccountI

NewAccountFromAddr creates a new account from the provided address with the provided balance

func (*Suite) NewBondCoin

func (suite *Suite) NewBondCoin(amount sdkmath.Int) sdk.Coin

NewBondCoin creates a Coin with the current staking denom.

func (*Suite) RemoveCoinsFromModule

func (suite *Suite) RemoveCoinsFromModule(amount sdk.Coins)

RemoveCoinsFromModule removes coins to the earn module account

func (*Suite) SavingsDepositAmountEqual

func (suite *Suite) SavingsDepositAmountEqual(expected sdk.Coins)

SavingsDepositAmountEqual asserts that the savings deposit amount matches the provided values.

func (*Suite) SetupTest

func (suite *Suite) SetupTest()

SetupTest instantiates a new app, keepers, and sets suite state

func (*Suite) VaultAccountSharesEqual

func (suite *Suite) VaultAccountSharesEqual(accs []sdk.AccAddress, supplies []sdk.Coins)

VaultAccountSharesEqual asserts that the vault account shares match the provided values.

func (*Suite) VaultTotalSharesEqual

func (suite *Suite) VaultTotalSharesEqual(expected types.VaultShares)

VaultTotalSharesEqual asserts that the vault total shares match the provided values.

func (*Suite) VaultTotalValuesEqual

func (suite *Suite) VaultTotalValuesEqual(expected sdk.Coins)

VaultTotalValuesEqual asserts that the vault total values match the provided values.

Jump to

Keyboard shortcuts

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