Skip to content

Commit 897ca38

Browse files
mmsqemergify[bot]
authored andcommitted
test(systemtests): fix query block-results in TestStakeUnstake for v2 (#22782)
(cherry picked from commit 3a2a0ac) # Conflicts: # server/v2/testdata/app.toml
1 parent 8b4dd8e commit 897ca38

2 files changed

Lines changed: 49 additions & 1 deletion

File tree

server/v2/testdata/app.toml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[grpc]
2+
# Enable defines if the gRPC server should be enabled.
3+
enable = false
4+
# Address defines the gRPC server address to bind to.
5+
address = 'localhost:9090'
6+
# MaxRecvMsgSize defines the max message size in bytes the server can receive.
7+
# The default value is 10MB.
8+
max-recv-msg-size = 10485760
9+
# MaxSendMsgSize defines the max message size in bytes the server can send.
10+
# The default value is math.MaxInt32.
11+
max-send-msg-size = 2147483647
12+
13+
[mock-server-1]
14+
# Mock field
15+
mock_field = 'default'
16+
# Mock field two
17+
mock_field_two = 1
18+
19+
[server]
20+
# minimum-gas-prices defines the price which a validator is willing to accept for processing a transaction. A transaction's fees must meet the minimum of any denomination specified in this config (e.g. 0.25token1;0.0001token2).
21+
minimum-gas-prices = '0stake'
22+
23+
[store]
24+
# The type of database for application and snapshots databases.
25+
app-db-backend = 'goleveldb'
26+
27+
[store.options]
28+
# State storage database type. Currently we support: "pebble" and "rocksdb"
29+
ss-type = 'pebble'
30+
# State commitment database type. Currently we support: "iavl" and "iavl-v2"
31+
sc-type = 'iavl'
32+
33+
# Pruning options for state commitment
34+
[store.options.sc-pruning-option]
35+
# Number of recent heights to keep on disk.
36+
keep-recent = 2
37+
# Height interval at which pruned heights are removed from disk.
38+
interval = 100
39+
40+
[store.options.iavl-config]
41+
# CacheSize set the size of the iavl tree cache.
42+
cache-size = 100000
43+
# If true, the tree will work like no fast storage and always not upgrade fast storage.
44+
skip-fast-storage-upgrade = true

tests/systemtests/staking_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ func TestStakeUnstake(t *testing.T) {
4242
assert.Equal(t, int64(8999999), cli.QueryBalance(account1Addr, "stake"))
4343

4444
// check validator has been updated
45-
rsp = cli.CustomQuery("q", "block-results", gjson.Get(rsp, "height").String())
45+
if systest.IsV2() {
46+
rsp = cli.CustomQuery("q", "comet", "block-results", gjson.Get(rsp, "height").String())
47+
} else {
48+
rsp = cli.CustomQuery("q", "block-results", gjson.Get(rsp, "height").String())
49+
}
4650
validatorUpdates := gjson.Get(rsp, "validator_updates").Array()
4751
assert.NotEmpty(t, validatorUpdates)
4852
vpk := gjson.Get(validatorUpdates[0].String(), "pub_key_bytes").String()

0 commit comments

Comments
 (0)