Merge PR #53: Update latest SDK version: Events Refactor
This commit is contained in:
committed by
GitHub
parent
bd72311e47
commit
0432ac52c0
@@ -483,7 +483,7 @@ func TestGaiaCLISubmitProposal(t *testing.T) {
|
||||
tests.WaitForNextNBlocksTM(1, f.Port)
|
||||
|
||||
// Ensure transaction tags can be queried
|
||||
searchResult := f.QueryTxs(1, 50, "action:submit_proposal", fmt.Sprintf("sender:%s", fooAddr))
|
||||
searchResult := f.QueryTxs(1, 50, "message.action:submit_proposal", fmt.Sprintf("message.sender:%s", fooAddr))
|
||||
require.Len(t, searchResult.Txs, 1)
|
||||
|
||||
// Ensure deposit was deducted
|
||||
@@ -527,7 +527,7 @@ func TestGaiaCLISubmitProposal(t *testing.T) {
|
||||
require.Equal(t, proposalTokens.Add(depositTokens), deposit.Amount.AmountOf(denom))
|
||||
|
||||
// Ensure tags are set on the transaction
|
||||
searchResult = f.QueryTxs(1, 50, "action:deposit", fmt.Sprintf("sender:%s", fooAddr))
|
||||
searchResult = f.QueryTxs(1, 50, "message.action:deposit", fmt.Sprintf("message.sender:%s", fooAddr))
|
||||
require.Len(t, searchResult.Txs, 1)
|
||||
|
||||
// Ensure account has expected amount of funds
|
||||
@@ -564,7 +564,7 @@ func TestGaiaCLISubmitProposal(t *testing.T) {
|
||||
require.Equal(t, gov.OptionYes, votes[0].Option)
|
||||
|
||||
// Ensure tags are applied to voting transaction properly
|
||||
searchResult = f.QueryTxs(1, 50, "action:vote", fmt.Sprintf("sender:%s", fooAddr))
|
||||
searchResult = f.QueryTxs(1, 50, "message.action:vote", fmt.Sprintf("message.sender:%s", fooAddr))
|
||||
require.Len(t, searchResult.Txs, 1)
|
||||
|
||||
// Ensure no proposals in deposit period
|
||||
@@ -626,7 +626,7 @@ func TestGaiaCLISubmitParamChangeProposal(t *testing.T) {
|
||||
tests.WaitForNextNBlocksTM(1, f.Port)
|
||||
|
||||
// ensure transaction tags can be queried
|
||||
txsPage := f.QueryTxs(1, 50, "action:submit_proposal", fmt.Sprintf("sender:%s", fooAddr))
|
||||
txsPage := f.QueryTxs(1, 50, "message.action:submit_proposal", fmt.Sprintf("message.sender:%s", fooAddr))
|
||||
require.Len(t, txsPage.Txs, 1)
|
||||
|
||||
// ensure deposit was deducted
|
||||
@@ -710,7 +710,7 @@ func TestGaiaCLISubmitCommunityPoolSpendProposal(t *testing.T) {
|
||||
tests.WaitForNextNBlocksTM(1, f.Port)
|
||||
|
||||
// ensure transaction tags can be queried
|
||||
txsPage := f.QueryTxs(1, 50, "action:submit_proposal", fmt.Sprintf("sender:%s", fooAddr))
|
||||
txsPage := f.QueryTxs(1, 50, "message.action:submit_proposal", fmt.Sprintf("message.sender:%s", fooAddr))
|
||||
require.Len(t, txsPage.Txs, 1)
|
||||
|
||||
// ensure deposit was deducted
|
||||
@@ -755,33 +755,33 @@ func TestGaiaCLIQueryTxPagination(t *testing.T) {
|
||||
}
|
||||
|
||||
// perPage = 15, 2 pages
|
||||
txsPage1 := f.QueryTxs(1, 15, fmt.Sprintf("sender:%s", fooAddr))
|
||||
txsPage1 := f.QueryTxs(1, 15, fmt.Sprintf("message.sender:%s", fooAddr))
|
||||
require.Len(t, txsPage1.Txs, 15)
|
||||
require.Equal(t, txsPage1.Count, 15)
|
||||
txsPage2 := f.QueryTxs(2, 15, fmt.Sprintf("sender:%s", fooAddr))
|
||||
txsPage2 := f.QueryTxs(2, 15, fmt.Sprintf("message.sender:%s", fooAddr))
|
||||
require.Len(t, txsPage2.Txs, 15)
|
||||
require.NotEqual(t, txsPage1.Txs, txsPage2.Txs)
|
||||
txsPage3 := f.QueryTxs(3, 15, fmt.Sprintf("sender:%s", fooAddr))
|
||||
txsPage3 := f.QueryTxs(3, 15, fmt.Sprintf("message.sender:%s", fooAddr))
|
||||
require.Len(t, txsPage3.Txs, 15)
|
||||
require.Equal(t, txsPage2.Txs, txsPage3.Txs)
|
||||
|
||||
// perPage = 16, 2 pages
|
||||
txsPage1 = f.QueryTxs(1, 16, fmt.Sprintf("sender:%s", fooAddr))
|
||||
txsPage1 = f.QueryTxs(1, 16, fmt.Sprintf("message.sender:%s", fooAddr))
|
||||
require.Len(t, txsPage1.Txs, 16)
|
||||
txsPage2 = f.QueryTxs(2, 16, fmt.Sprintf("sender:%s", fooAddr))
|
||||
txsPage2 = f.QueryTxs(2, 16, fmt.Sprintf("message.sender:%s", fooAddr))
|
||||
require.Len(t, txsPage2.Txs, 14)
|
||||
require.NotEqual(t, txsPage1.Txs, txsPage2.Txs)
|
||||
|
||||
// perPage = 50
|
||||
txsPageFull := f.QueryTxs(1, 50, fmt.Sprintf("sender:%s", fooAddr))
|
||||
txsPageFull := f.QueryTxs(1, 50, fmt.Sprintf("message.sender:%s", fooAddr))
|
||||
require.Len(t, txsPageFull.Txs, 30)
|
||||
require.Equal(t, txsPageFull.Txs, append(txsPage1.Txs, txsPage2.Txs...))
|
||||
|
||||
// perPage = 0
|
||||
f.QueryTxsInvalid(errors.New("ERROR: page must greater than 0"), 0, 50, fmt.Sprintf("sender:%s", fooAddr))
|
||||
f.QueryTxsInvalid(errors.New("ERROR: page must greater than 0"), 0, 50, fmt.Sprintf("message.sender:%s", fooAddr))
|
||||
|
||||
// limit = 0
|
||||
f.QueryTxsInvalid(errors.New("ERROR: limit must greater than 0"), 1, 0, fmt.Sprintf("sender:%s", fooAddr))
|
||||
f.QueryTxsInvalid(errors.New("ERROR: limit must greater than 0"), 1, 0, fmt.Sprintf("message.sender:%s", fooAddr))
|
||||
|
||||
// Cleanup testing directories
|
||||
f.Cleanup()
|
||||
|
||||
Reference in New Issue
Block a user