From 8e770495545c5c21900c47a348732c08e19712a8 Mon Sep 17 00:00:00 2001 From: Sean King Date: Thu, 3 Feb 2022 15:21:46 +0100 Subject: [PATCH] test: Register using same owner address on multiple connections --- .../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) +}