-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: ica e2e test * refactor: globalfee e2e test * refactor: add execBankSendBatch * refactor: add const proposalGlobalFee * refactor: execBankSendBatch * Update tests/e2e/e2e_exec_test.go Co-authored-by: Danilo Pantani <[email protected]> * test: refactor execBankSendBatch * fix: failure test Co-authored-by: Danilo Pantani <[email protected]>
- Loading branch information
1 parent
3387d79
commit 1ae81a6
Showing
5 changed files
with
277 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package e2e | ||
|
||
import ( | ||
"fmt" | ||
"time" | ||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" | ||
) | ||
|
||
func (s *IntegrationTestSuite) govProposeNewGlobalfee(newGlobalfee sdk.DecCoins, proposalCounter int, submitter string, fees string) { | ||
s.writeGovParamChangeProposalGlobalFees(s.chainA, newGlobalfee) | ||
chainAAPIEndpoint := fmt.Sprintf("http://%s", s.valResources[s.chainA.id][0].GetHostPort("1317/tcp")) | ||
// gov proposing new fees | ||
s.T().Logf("Proposal number: %d", proposalCounter) | ||
s.T().Logf("Submitting, deposit and vote legacy Gov Proposal: change global fee to %s", newGlobalfee.String()) | ||
s.submitLegacyGovProposal(chainAAPIEndpoint, submitter, fees, "param-change", proposalCounter, configFile(proposalGlobalFee)) | ||
s.depositGovProposal(chainAAPIEndpoint, submitter, fees, proposalCounter) | ||
s.voteGovProposal(chainAAPIEndpoint, submitter, fees, proposalCounter, "yes", false) | ||
|
||
// query the proposal status and new fee | ||
s.Require().Eventually( | ||
func() bool { | ||
proposal, err := queryGovProposal(chainAAPIEndpoint, proposalCounter) | ||
s.Require().NoError(err) | ||
return proposal.GetProposal().Status == govv1beta1.StatusPassed | ||
}, | ||
15*time.Second, | ||
5*time.Second, | ||
) | ||
|
||
s.Require().Eventually( | ||
func() bool { | ||
globalFees, err := queryGlobalFees(chainAAPIEndpoint) | ||
s.T().Logf("After gov new global fee proposal: %s", globalFees.String()) | ||
s.Require().NoError(err) | ||
|
||
// attention: if global fee is empty, when query globalfee, it shows empty rather than default ante.DefaultZeroGlobalFee() = 0uatom. | ||
return globalFees.IsEqual(newGlobalfee) | ||
}, | ||
15*time.Second, | ||
5*time.Second, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.