From 417415510447c7a6f914a84d2e0129d81ec980f2 Mon Sep 17 00:00:00 2001 From: Sean King Date: Fri, 4 Feb 2022 09:11:19 +0100 Subject: [PATCH] test: Register using same owner address on multiple connections (#846) (cherry picked from commit f6a9279936c3571268c39e4e09faa236ed3e82b9) --- .../controller/keeper/account_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/modules/apps/27-interchain-accounts/controller/keeper/account_test.go b/modules/apps/27-interchain-accounts/controller/keeper/account_test.go index 11334c332ea..9387baa3936 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/account_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/account_test.go @@ -82,3 +82,21 @@ func (suite *KeeperTestSuite) TestRegisterInterchainAccount() { }) } } + +func (suite *KeeperTestSuite) TestRegisterSameOwnerMultipleConnections() { + suite.SetupTest() + + owner := TestOwnerAddress + + path := NewICAPath(suite.chainA, suite.chainB) + suite.coordinator.SetupConnections(path) + + path2 := NewICAPath(suite.chainA, suite.chainC) + suite.coordinator.SetupConnections(path2) + + err := suite.chainA.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(suite.chainA.GetContext(), path.EndpointA.ConnectionID, owner) + suite.Require().NoError(err) + + err = suite.chainA.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(suite.chainA.GetContext(), path2.EndpointA.ConnectionID, owner) + suite.Require().NoError(err) +}