Skip to content

Commit

Permalink
chore: use notempty instead notzero (#6076)
Browse files Browse the repository at this point in the history
  • Loading branch information
crodriguezvega authored Apr 2, 2024
1 parent 71d1014 commit 527ce1d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions e2e/tests/interchain_accounts/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (s *InterchainAccountsTestSuite) testMsgSendTxSuccessfulTransfer(order chan
var err error
hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(hostAccount))
s.Require().NotEmpty(hostAccount)

channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID)
s.Require().NoError(err)
Expand Down Expand Up @@ -189,7 +189,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_FailedTransfer_InsufficientF
var err error
hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(hostAccount))
s.Require().NotEmpty(hostAccount)

channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID)
s.Require().NoError(err)
Expand Down Expand Up @@ -287,7 +287,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer_AfterReop
var err error
hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(hostAccount))
s.Require().NotEmpty(hostAccount)

_, err = s.QueryChannel(ctx, chainA, portID, initialChannelID)
s.Require().NoError(err)
Expand Down Expand Up @@ -467,7 +467,7 @@ func (s *InterchainAccountsTestSuite) testMsgSendTxSuccessfulGovProposal(order c
var err error
hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(hostAccount))
s.Require().NotEmpty(hostAccount)

channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID)
s.Require().NoError(err)
Expand Down
12 changes: 6 additions & 6 deletions e2e/tests/interchain_accounts/localhost_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_Localhost(
t.Run("verify interchain account registration and deposit funds", func(t *testing.T) {
interchainAccAddress, err := s.QueryInterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(interchainAccAddress))
s.Require().NotEmpty(interchainAccAddress)

walletAmount := ibc.WalletAmount{
Address: interchainAccAddress,
Expand All @@ -136,7 +136,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_Localhost(
t.Run("send packet localhost interchain accounts", func(t *testing.T) {
interchainAccAddress, err := s.QueryInterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(interchainAccAddress))
s.Require().NotEmpty(interchainAccAddress)

msgSend := &banktypes.MsgSend{
FromAddress: interchainAccAddress,
Expand Down Expand Up @@ -277,7 +277,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan
t.Run("verify interchain account registration and deposit funds", func(t *testing.T) {
interchainAccAddress, err := s.QueryInterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(interchainAccAddress))
s.Require().NotEmpty(interchainAccAddress)

walletAmount := ibc.WalletAmount{
Address: interchainAccAddress,
Expand All @@ -291,7 +291,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan
t.Run("send localhost interchain accounts packet with timeout", func(t *testing.T) {
interchainAccAddress, err := s.QueryInterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(interchainAccAddress))
s.Require().NotEmpty(interchainAccAddress)

msgSend := &banktypes.MsgSend{
FromAddress: interchainAccAddress,
Expand Down Expand Up @@ -407,7 +407,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan
t.Run("verify interchain account and existing balance", func(t *testing.T) {
interchainAccAddress, err := s.QueryInterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(interchainAccAddress))
s.Require().NotEmpty(interchainAccAddress)

balance, err := s.QueryBalance(ctx, chainA, interchainAccAddress, chainADenom)
s.Require().NoError(err)
Expand All @@ -419,7 +419,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan
t.Run("send packet localhost interchain accounts", func(t *testing.T) {
interchainAccAddress, err := s.QueryInterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(interchainAccAddress))
s.Require().NotEmpty(interchainAccAddress)

msgSend := &banktypes.MsgSend{
FromAddress: interchainAccAddress,
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/interchain_accounts/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (s *InterchainAccountsParamsTestSuite) TestHostEnabledParam() {
var err error
hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(hostAccount))
s.Require().NotEmpty(hostAccount)

channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID)
s.Require().NoError(err)
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/interchain_accounts/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (s *InterchainAccountsQueryTestSuite) TestInterchainAccountsQuery() {
var err error
hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(hostAccount))
s.Require().NotEmpty(hostAccount)

channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID)
s.Require().NoError(err)
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/interchain_accounts/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (s *InterchainAccountsChannelUpgradesTestSuite) TestMsgSendTx_SuccessfulTra
var err error
hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(hostAccount))
s.Require().NotEmpty(hostAccount)

_, err = s.QueryChannel(ctx, chainA, portID, initialChannelID)
s.Require().NoError(err)
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/upgrades/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (s *GenesisTestSuite) TestIBCGenesis() {
var err error
hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(hostAccount))
s.Require().NotEmpty(hostAccount)

channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID)
s.Require().NoError(err)
Expand Down

0 comments on commit 527ce1d

Please sign in to comment.