From e52ae4ee6dd38ce4aff7501ae13e4f34e4f85f60 Mon Sep 17 00:00:00 2001 From: kirdatatjana Date: Wed, 4 Sep 2024 13:24:23 +0200 Subject: [PATCH] Cleaned up TODOs and updated test descriptions --- scripts/test_doc/test_documentation.md | 2 +- tests/integration/stop_consumer.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/test_doc/test_documentation.md b/scripts/test_doc/test_documentation.md index 9511743ea1..ddaf103cbf 100644 --- a/scripts/test_doc/test_documentation.md +++ b/scripts/test_doc/test_documentation.md @@ -109,7 +109,7 @@ | Function | Short Description | |----------|-------------------| [TestStopConsumerChain](../../tests/integration/stop_consumer.go#L24) | TestStopConsumerChain tests the functionality of stopping a consumer chain at a higher level than unit tests.
DetailsIt retrieves a validator from the provider chain's validators and then the delegator address.
Then the test sets up test operations, populating the provider chain states using the following operations:
- Setup CCV channels; establishes the CCV channel and sets channelToChain, chainToChannel, and initHeight mapping for the consumer chain ID.
- Delegate the total bond amount to the chosen validator.
- Undelegate the shares in four consecutive blocks evenly; create UnbondingOp and UnbondingOpIndex entries for the consumer chain ID.
- Set SlashAck state for the consumer chain ID.

After, the setup operations are executed, and the consumer chain is stopped. Finally, the test checks that the state
associated with the consumer chain is properly cleaned up after it is stopped.
| - [TestStopConsumerOnChannelClosed](../../tests/integration/stop_consumer.go#L109) | TODO Simon: implement OnChanCloseConfirm in IBC-GO testing to close the consumer chain's channel end | + [TestStopConsumerOnChannelClosed](../../tests/integration/stop_consumer.go#L114) | TestStopConsumerOnChannelClosed tests stopping a consumer chain correctly.
DetailsThis test sets up CCV channel and transfer channel, and sends empty VSC packet.
Then it stops the consumer chain and verifies that the provider chain's channel end is closed

TODO Simon: implement OnChanCloseConfirm in IBC-GO testing to close the consumer chain's channel end
| # [throttle.go](../../tests/integration/throttle.go) diff --git a/tests/integration/stop_consumer.go b/tests/integration/stop_consumer.go index 71d6a6dc12..291ee8e887 100644 --- a/tests/integration/stop_consumer.go +++ b/tests/integration/stop_consumer.go @@ -105,6 +105,11 @@ func (s *CCVTestSuite) TestStopConsumerChain() { s.checkConsumerChainIsRemoved(firstBundle.Chain.ChainID, true) } +// TestStopConsumerOnChannelClosed tests stopping a consumer chain correctly. +// @Long Description@ +// This test sets up CCV channel and transfer channel, and sends empty VSC packet. +// Then it stops the consumer chain and verifies that the provider chain's channel end is closed +// // TODO Simon: implement OnChanCloseConfirm in IBC-GO testing to close the consumer chain's channel end func (s *CCVTestSuite) TestStopConsumerOnChannelClosed() { // init the CCV channel states