-
Notifications
You must be signed in to change notification settings - Fork 164
/
Copy pathquery_providerinfo_test.go
24 lines (21 loc) · 1.08 KB
/
query_providerinfo_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package integration
import "strings"
// TestQueryProviderInfo tests the results of GetProviderInfo method.
// @Long Description@
// * Set up a CCV channel and send an empty VSC packet.
// * Verify that the result of GetProviderInfo method is correct and it
// provides expected information about the blockchain provider and consumer.
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().True(strings.HasPrefix(chainInfo.Provider.ChannelID, "channel-"))
s.Require().True(strings.HasPrefix(chainInfo.Consumer.ChannelID, "channel-"))
}