Skip to content

Commit

Permalink
test: expand unit tests to test for the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ninabarbakadze committed Nov 18, 2024
1 parent ed06924 commit cbfb824
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion state/txindex/kv/kv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,18 @@ func TestTxSearchMultipleTxs(t *testing.T) {

results, err := indexer.Search(ctx, query.MustParse("account.number >= 1"))
assert.NoError(t, err)

require.Len(t, results, 3)

// since two txs were added at height 1 and 2, we should have two unique transactions
// for both heights
results, err = indexer.Search(ctx, query.MustParse("tx.height=1"))
assert.NoError(t, err)
require.Len(t, results, 2)

results, err = indexer.Search(ctx, query.MustParse("tx.height=2"))
assert.NoError(t, err)
require.Len(t, results, 2)

}

func txResultWithEvents(events []abci.Event) *abci.TxResult {
Expand Down

0 comments on commit cbfb824

Please sign in to comment.