From 2b9984749f1d0fb23c9f5545369c5ee3407e2890 Mon Sep 17 00:00:00 2001 From: yaruwangway <69694322+yaruwangway@users.noreply.github.com> Date: Wed, 11 Oct 2023 15:06:26 +0200 Subject: [PATCH] test: add test for queryProviderInfo (#1189) * test: add test for queryProviderInfo * chore: correct typo --- 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..8058248310 --- /dev/null +++ b/tests/integration/query_providerinfo_test.go @@ -0,0 +1,17 @@ +package integration + +func (s *CCVTestSuite) TestQueryProviderInfo() { + 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") +}