Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
sainoe committed Sep 19, 2023
1 parent 57fb79e commit bdd6dce
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
4 changes: 2 additions & 2 deletions tests/e2e/e2e_bank_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (s *IntegrationTestSuite) testBankTokenTransfer() {
5*time.Second,
)

// alice sends token to bob
// alice sends tokens to bob
s.execBankSend(s.chainA, 0, alice.String(), bob.String(), tokenAmount.String(), standardFees.String(), false)

s.Require().Eventually(
Expand All @@ -64,7 +64,7 @@ func (s *IntegrationTestSuite) testBankTokenTransfer() {
5*time.Second,
)

// save the current account balances of alice and bob
// save the updated account balances of alice and bob
beforeAliceUAtomBalance, beforeBobUAtomBalance = afterAliceUAtomBalance, afterBobUAtomBalance

// alice sends tokens to bob and charlie, at once
Expand Down
11 changes: 3 additions & 8 deletions tests/e2e/e2e_exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ func (s *IntegrationTestSuite) runGovExec(c *chain, valIdx int, submitterAddr, g
// })
// }

// TODO rename to execDelegate for consistency
func (s *IntegrationTestSuite) executeDelegate(c *chain, valIdx int, amount, valOperAddress, delegatorAddr, home, delegateFees string) { //nolint:unparam

ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
Expand Down Expand Up @@ -493,8 +494,7 @@ func (s *IntegrationTestSuite) executeDelegate(c *chain, valIdx int, amount, val
s.T().Logf("%s successfully delegated %s to %s", delegatorAddr, amount, valOperAddress)
}

func (s *IntegrationTestSuite) executeUnbondDelegation(c *chain, valIdx int, amount, valOperAddress, delegatorAddr, home, delegateFees string) { //nolint:unparam

func (s *IntegrationTestSuite) execUnbondDelegation(c *chain, valIdx int, amount, valOperAddress, delegatorAddr, home, delegateFees string) { //nolint:unparam
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()

Expand Down Expand Up @@ -548,8 +548,8 @@ func (s *IntegrationTestSuite) executeCancelUnbondingDelegation(c *chain, valIdx
s.T().Logf("%s successfully undelegated %s to %s", delegatorAddr, amount, valOperAddress)
}

// TODO rename to execDelegate for consistency
func (s *IntegrationTestSuite) executeRedelegate(c *chain, valIdx int, amount, originalValOperAddress,

newValOperAddress, delegatorAddr, home, delegateFees string,
) {
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
Expand Down Expand Up @@ -698,8 +698,6 @@ func (s *IntegrationTestSuite) executeGaiaTxCommand(ctx context.Context, c *chai
})
s.Require().NoError(err)

fmt.Println(gaiaCommand)

err = s.dkrPool.Client.StartExec(exec.ID, docker.StartExecOptions{
Context: ctx,
Detach: false,
Expand All @@ -711,9 +709,6 @@ func (s *IntegrationTestSuite) executeGaiaTxCommand(ctx context.Context, c *chai
stdOut := outBuf.Bytes()
stdErr := errBuf.Bytes()

fmt.Println("stdOut", string(stdOut))
fmt.Println("stdErr", string(stdErr))

if !validation(stdOut, stdErr) {
s.Require().FailNowf("Exec validation failed", "stdout: %s, stderr: %s",
string(stdOut), string(stdErr))
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/e2e_staking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (s *IntegrationTestSuite) testStaking() {
)

// Alice unbonds all her uatom delegation from Validator A
s.executeUnbondDelegation(s.chainA, 0, currDelegation.String(), validatorAddressA, delegatorAddress.String(), gaiaHomePath, fees.String())
s.execUnbondDelegation(s.chainA, 0, currDelegation.String(), validatorAddressA, delegatorAddress.String(), gaiaHomePath, fees.String())

var (
ubdDelegationEntry types.UnbondingDelegationEntry
Expand Down
5 changes: 0 additions & 5 deletions tests/e2e/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ import (
)

func queryGaiaTx(endpoint, txHash string) error {

fmt.Println(fmt.Sprintf("%s/cosmos/tx/v1beta1/txs/%s", endpoint, txHash))

resp, err := http.Get(fmt.Sprintf("%s/cosmos/tx/v1beta1/txs/%s", endpoint, txHash))
if err != nil {
return fmt.Errorf("failed to execute HTTP request: %w", err)
Expand Down Expand Up @@ -129,8 +126,6 @@ func queryDelegation(endpoint string, validatorAddr string, delegatorAddr string

func queryUnbondingDelegation(endpoint string, validatorAddr string, delegatorAddr string) (stakingtypes.QueryUnbondingDelegationResponse, error) {
var res stakingtypes.QueryUnbondingDelegationResponse

fmt.Println(fmt.Sprintf(fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s/unbonding_delegation", endpoint, validatorAddr, delegatorAddr)))
body, err := httpGet(fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s/unbonding_delegation", endpoint, validatorAddr, delegatorAddr))
if err != nil {
return res, err
Expand Down

0 comments on commit bdd6dce

Please sign in to comment.