Files
wasmd/tests/system/genesis_mutators.go
Alexander Peters a4548ba175 Start system tests (#1410)
* Start system tests

* Go mod tidy

* Add system tests (#1411)

* Add tests

* Add test-system to CI

* Fix path

* Remove store artifact steps

* Add small fixes

* Add stake/unstake tests

* Add unsafe-reset-all extention + system test

* Replace ustake with stake

* Add more tests + fix bug in cli

* Fix comments and add multi contract system test

* Updates and fixes to system tests (#1449)

* Updates

* Minor cleanup

* Make tests pass

---------

Co-authored-by: Alexander Peters <alpe@users.noreply.github.com>

* Fix Makefile to return exit code for system tests (#1450)

* Abort on error results

---------

Co-authored-by: pinosu <95283998+pinosu@users.noreply.github.com>
2023-06-15 16:55:33 +02:00

20 lines
448 B
Go

package system
import (
"fmt"
"testing"
"github.com/stretchr/testify/require"
"github.com/tidwall/sjson"
)
// SetConsensusMaxGas max gas that can be consumed in a block
func SetConsensusMaxGas(t *testing.T, max int) GenesisMutator {
return func(genesis []byte) []byte {
t.Helper()
state, err := sjson.SetRawBytes(genesis, "consensus_params.block.max_gas", []byte(fmt.Sprintf(`"%d"`, max)))
require.NoError(t, err)
return state
}
}