Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(systemtest): Fix prune & gov test #22190

Merged
merged 3 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/systemtests/gov_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ func TestQueryDeposit(t *testing.T) {

sut.ResetChain(t)
cli := NewCLIWrapper(t, sut, verbose)
// Set short period
sut.ModifyGenesisJSON(t, SetGovVotingPeriod(t, time.Second*8))

// get validator address
valAddr := gjson.Get(cli.Keys("keys", "list"), "0.address").String()
Expand Down
2 changes: 1 addition & 1 deletion tests/systemtests/snapshots_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func TestPrune(t *testing.T) {
// prune
var command []string
if isV2() {
command = []string{"store", "prune", "--keep-recent=1"}
command = []string{"store", "prune", "--store.keep-recent=1"}
} else {
command = []string{"prune", "everything"}
}
Expand Down
5 changes: 0 additions & 5 deletions tests/systemtests/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,6 @@ func (s *SystemUnderTest) SetupChain() {
if err != nil {
panic(fmt.Sprintf("failed to set block max gas: %s", err))
}
// Short period for gov
genesisBz, err = sjson.SetRawBytes(genesisBz, "app_state.gov.params.voting_period", []byte(fmt.Sprintf(`"%s"`, "8s")))
if err != nil {
panic(fmt.Sprintf("failed to set regular voting period: %s", err))
}
// update expedited voting period to avoid validation error
genesisBz, err = sjson.SetRawBytes(genesisBz, "app_state.gov.params.expedited_voting_period", []byte(fmt.Sprintf(`"%s"`, "7s")))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hieuvubk Can you move this too to gov_test.go? This was added due to voting_period change earlier.

if err != nil {
Expand Down
Loading