Documentation
¶
Index ¶
- type CCVTestSuite
- func (suite *CCVTestSuite) CompleteSetupCCVChannel()
- func (suite *CCVTestSuite) CreateCustomClient(endpoint *ibctesting.Endpoint, unbondingPeriod time.Duration)
- func (suite *CCVTestSuite) SendEmptyVSCPacket()
- func (suite *CCVTestSuite) SetupCCVChannel()
- func (suite *CCVTestSuite) SetupTest()
- func (suite *CCVTestSuite) SetupTransferChannel()
- func (suite *CCVTestSuite) StartSetupCCVChannel()
- func (suite *CCVTestSuite) TestConsumerGenesis()
- func (suite *CCVTestSuite) TestHandleSlashPacketDistribution()
- func (suite *CCVTestSuite) TestHandleSlashPacketDoubleSigning()
- func (suite *CCVTestSuite) TestHandleSlashPacketErrors()
- func (k CCVTestSuite) TestHistoricalInfo()
- func (suite *CCVTestSuite) TestInitTimeout()
- func (s *CCVTestSuite) TestPacketRoundtrip()
- func (suite *CCVTestSuite) TestProviderChannelClosed()
- func (suite *CCVTestSuite) TestProviderClientMatches()
- func (s *CCVTestSuite) TestRedelegationNoConsumer()
- func (s *CCVTestSuite) TestRedelegationProviderFirst()
- func (s *CCVTestSuite) TestRewardsDistribution()
- func (suite *CCVTestSuite) TestSendSlashPacket()
- func (s *CCVTestSuite) TestSendSlashPacketDoubleSign()
- func (s *CCVTestSuite) TestSendSlashPacketDowntime()
- func (suite *CCVTestSuite) TestSendVSCMaturedPackets()
- func (s *CCVTestSuite) TestSlashPacketAcknowldgement()
- func (s *CCVTestSuite) TestStopConsumerChain()
- func (s *CCVTestSuite) TestStopConsumerOnChannelClosed()
- func (s *CCVTestSuite) TestUnbondingNoConsumer()
- func (s *CCVTestSuite) TestUndelegationDuringInit()
- func (s *CCVTestSuite) TestUndelegationNormalOperation()
- func (s *CCVTestSuite) TestUndelegationVscTimeout()
- func (suite *CCVTestSuite) TestValidatorDoubleSigning()
- func (suite *CCVTestSuite) TestValidatorDowntime()
- type ChainType
- type ConsumerDemocracyTestSuite
- type DemocSetupCallback
- type SetupCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CCVTestSuite ¶
CCVTestSuite is an in-mem test suite which implements the standard group of tests validating the e2e functionality of ccv enabled chains. Any method implemented for this struct will be ran when suite.Run() is called.
func NewCCVTestSuite ¶
func NewCCVTestSuite(setupCallback SetupCallback) *CCVTestSuite
NewCCVTestSuite returns a new instance of CCVTestSuite, ready to be tested against using suite.Run().
func (*CCVTestSuite) CompleteSetupCCVChannel ¶
func (suite *CCVTestSuite) CompleteSetupCCVChannel()
func (*CCVTestSuite) CreateCustomClient ¶
func (suite *CCVTestSuite) CreateCustomClient(endpoint *ibctesting.Endpoint, unbondingPeriod time.Duration)
CreateCustomClient creates an IBC client on the endpoint using the given unbonding period. It will update the clientID for the endpoint if the message is successfully executed.
func (*CCVTestSuite) SendEmptyVSCPacket ¶
func (suite *CCVTestSuite) SendEmptyVSCPacket()
SendEmptyVSCPacket sends a VSC packet without any changes to ensure that the channel gets established
func (*CCVTestSuite) SetupCCVChannel ¶
func (suite *CCVTestSuite) SetupCCVChannel()
func (*CCVTestSuite) SetupTest ¶
func (suite *CCVTestSuite) SetupTest()
SetupTest sets up in-mem state before every test
func (*CCVTestSuite) SetupTransferChannel ¶
func (suite *CCVTestSuite) SetupTransferChannel()
func (*CCVTestSuite) StartSetupCCVChannel ¶
func (suite *CCVTestSuite) StartSetupCCVChannel()
func (*CCVTestSuite) TestConsumerGenesis ¶
func (suite *CCVTestSuite) TestConsumerGenesis()
func (*CCVTestSuite) TestHandleSlashPacketDistribution ¶
func (suite *CCVTestSuite) TestHandleSlashPacketDistribution()
TestHandleSlashPacketDistribution tests the slashing of an undelegation balance by varying the slash packet VSC ID mapping to infraction heights lesser, equal or greater than the undelegation entry creation height
func (*CCVTestSuite) TestHandleSlashPacketDoubleSigning ¶
func (suite *CCVTestSuite) TestHandleSlashPacketDoubleSigning()
TestHandleSlashPacketDoubleSigning tests the handling of a double-signing related slash packet, with e2e tests
func (*CCVTestSuite) TestHandleSlashPacketErrors ¶
func (suite *CCVTestSuite) TestHandleSlashPacketErrors()
TestHandleSlashPacketErrors tests errors for the HandleSlashPacket method in an e2e testing setting
func (CCVTestSuite) TestHistoricalInfo ¶
func (k CCVTestSuite) TestHistoricalInfo()
Tests the tracking of historical info in the context of new blocks being committed
func (*CCVTestSuite) TestInitTimeout ¶
func (suite *CCVTestSuite) TestInitTimeout()
TestInitTimeout tests the init timeout
func (*CCVTestSuite) TestPacketRoundtrip ¶
func (s *CCVTestSuite) TestPacketRoundtrip()
TestPacketRoundtrip tests a CCV packet roundtrip when tokens are bonded on provider
func (*CCVTestSuite) TestProviderChannelClosed ¶
func (suite *CCVTestSuite) TestProviderChannelClosed()
TestProviderChannelClosed checks that a consumer chain panics when the provider channel was established and then closed
func (*CCVTestSuite) TestProviderClientMatches ¶
func (suite *CCVTestSuite) TestProviderClientMatches()
TestProviderClientMatches tests that the provider client managed by the consumer keeper matches the client keeper's client state
func (*CCVTestSuite) TestRedelegationNoConsumer ¶
func (s *CCVTestSuite) TestRedelegationNoConsumer()
TestRedelegationNoConsumer tests a redelegate transaction submitted on a provider chain with no consumers
func (*CCVTestSuite) TestRedelegationProviderFirst ¶
func (s *CCVTestSuite) TestRedelegationProviderFirst()
TestRedelegationWithConsumer tests a redelegate transaction submitted on a provider chain when the unbonding period elapses first on the provider chain
func (*CCVTestSuite) TestRewardsDistribution ¶
func (s *CCVTestSuite) TestRewardsDistribution()
This test is valid for minimal viable consumer chain
func (*CCVTestSuite) TestSendSlashPacket ¶
func (suite *CCVTestSuite) TestSendSlashPacket()
TestSendSlashPacket tests the functionality of SendSlashPacket and asserts state changes related to that method
func (*CCVTestSuite) TestSendSlashPacketDoubleSign ¶
func (s *CCVTestSuite) TestSendSlashPacketDoubleSign()
func (*CCVTestSuite) TestSendSlashPacketDowntime ¶
func (s *CCVTestSuite) TestSendSlashPacketDowntime()
TestSendDowntimePacket tests consumer initiated slashing
func (*CCVTestSuite) TestSendVSCMaturedPackets ¶
func (suite *CCVTestSuite) TestSendVSCMaturedPackets()
TestSendVSCMaturedPackets tests the behavior of SendVSCMaturedPackets and related state checks
func (*CCVTestSuite) TestSlashPacketAcknowldgement ¶
func (s *CCVTestSuite) TestSlashPacketAcknowldgement()
func (*CCVTestSuite) TestStopConsumerChain ¶
func (s *CCVTestSuite) TestStopConsumerChain()
Tests the functionality of stopping a consumer chain at a higher level than unit tests
func (*CCVTestSuite) TestStopConsumerOnChannelClosed ¶
func (s *CCVTestSuite) TestStopConsumerOnChannelClosed()
TODO Simon: implement OnChanCloseConfirm in IBC-GO testing to close the consumer chain's channel end
func (*CCVTestSuite) TestUnbondingNoConsumer ¶
func (s *CCVTestSuite) TestUnbondingNoConsumer()
Bond some tokens on provider Unbond them to create unbonding op Check unbonding ops on both sides Advance time so that provider's unbonding op completes Check that unbonding has completed in provider staking
func (*CCVTestSuite) TestUndelegationDuringInit ¶
func (s *CCVTestSuite) TestUndelegationDuringInit()
TestUndelegationDuringInit checks that before the CCV channel is established
- no undelegations can complete, even if the provider unbonding period elapses
- all the VSC packets are stored in state as pending
- if the channel handshake times out, then the undelegation completes
func (*CCVTestSuite) TestUndelegationNormalOperation ¶
func (s *CCVTestSuite) TestUndelegationNormalOperation()
TestUndelegationNormalOperation tests that undelegations complete after the unbonding period elapses on both the consumer and provider, without VSC packets timing out.
func (*CCVTestSuite) TestUndelegationVscTimeout ¶
func (s *CCVTestSuite) TestUndelegationVscTimeout()
TestUndelegationVscTimeout tests that an undelegation completes after vscTimeoutPeriod even if it does not reach maturity on the consumer chain. In this case, the consumer chain is removed.
func (*CCVTestSuite) TestValidatorDoubleSigning ¶
func (suite *CCVTestSuite) TestValidatorDoubleSigning()
TestValidatorDoubleSigning tests if a slash packet is sent when a double-signing evidence is handled by the evidence module
func (*CCVTestSuite) TestValidatorDowntime ¶
func (suite *CCVTestSuite) TestValidatorDowntime()
TestValidatorDowntime tests if a slash packet is sent and if the outstanding slashing flag is switched when a validator has downtime on the slashing module
type ChainType ¶
type ChainType int
ChainType defines the type of chain (either provider or consumer)
type ConsumerDemocracyTestSuite ¶
func NewConsumerDemocracyTestSuite ¶
func NewConsumerDemocracyTestSuite(setupCallback DemocSetupCallback) *ConsumerDemocracyTestSuite
NewCCVTestSuite returns a new instance of ConsumerDemocracyTestSuite, ready to be tested against using suite.Run().
func (*ConsumerDemocracyTestSuite) SetupTest ¶
func (suite *ConsumerDemocracyTestSuite) SetupTest()
SetupTest sets up in-mem state before every test relevant to ccv with a democracy consumer
func (*ConsumerDemocracyTestSuite) TestDemocracyGovernanceWhitelisting ¶
func (s *ConsumerDemocracyTestSuite) TestDemocracyGovernanceWhitelisting()
func (*ConsumerDemocracyTestSuite) TestDemocracyRewardsDistribution ¶
func (s *ConsumerDemocracyTestSuite) TestDemocracyRewardsDistribution()
type DemocSetupCallback ¶
type DemocSetupCallback func(t *testing.T) ( coord *ibctesting.Coordinator, consumerChain *ibctesting.TestChain, consumerApp e2e.DemocConsumerApp, )
Callback for instantiating a new coordinator, consumer test chain, and consumer app before every test defined on the suite.
type SetupCallback ¶
type SetupCallback func(t *testing.T) ( coord *ibctesting.Coordinator, providerChain *ibctesting.TestChain, consumerChain *ibctesting.TestChain, providerApp e2e.ProviderApp, consumerApp e2e.ConsumerApp, )
Callback for instantiating a new coordinator, provider/consumer test chains, and provider/consumer app before every test defined on the suite.