From d79fc053c2f935770811e031863628343ec28b84 Mon Sep 17 00:00:00 2001 From: Yaru Wang Date: Wed, 9 Aug 2023 12:45:19 +0200 Subject: [PATCH 1/2] test: add test for queryProviderInfo --- tests/integration/query_providerinfo_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/integration/query_providerinfo_test.go diff --git a/tests/integration/query_providerinfo_test.go b/tests/integration/query_providerinfo_test.go new file mode 100644 index 0000000000..bed6ef4fb3 --- /dev/null +++ b/tests/integration/query_providerinfo_test.go @@ -0,0 +1,17 @@ +package integration + +func (s *CCVTestSuite) TestAQueryProviderInfo() { + s.SetupCCVChannel(s.path) + s.SendEmptyVSCPacket() + + chainInfo, err := s.consumerApp.GetConsumerKeeper().GetProviderInfo(s.consumerCtx()) + s.Require().NoError(err) + s.Require().Equal(chainInfo.Provider.ChainID, "testchain1") + s.Require().Equal(chainInfo.Consumer.ChainID, "testchain2") + s.Require().Equal(chainInfo.Provider.ClientID, "07-tendermint-0") + s.Require().Equal(chainInfo.Consumer.ClientID, "07-tendermint-0") + s.Require().Equal(chainInfo.Provider.ConnectionID, "connection-0") + s.Require().Equal(chainInfo.Consumer.ConnectionID, "connection-0") + s.Require().Equal(chainInfo.Provider.ChannelID, "channel-0") + s.Require().Equal(chainInfo.Consumer.ChannelID, "channel-0") +} From 0e09af1eb5d755a3d3051322e55c411b4998f256 Mon Sep 17 00:00:00 2001 From: Yaru Wang Date: Wed, 9 Aug 2023 18:36:45 +0200 Subject: [PATCH 2/2] chore: correct typo --- tests/integration/query_providerinfo_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/query_providerinfo_test.go b/tests/integration/query_providerinfo_test.go index bed6ef4fb3..8058248310 100644 --- a/tests/integration/query_providerinfo_test.go +++ b/tests/integration/query_providerinfo_test.go @@ -1,6 +1,6 @@ package integration -func (s *CCVTestSuite) TestAQueryProviderInfo() { +func (s *CCVTestSuite) TestQueryProviderInfo() { s.SetupCCVChannel(s.path) s.SendEmptyVSCPacket()