mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-24 23:35:19 +00:00
fix simulations
This commit is contained in:
parent
e6a96fa4da
commit
b71ce1802b
10
Makefile
10
Makefile
@ -83,10 +83,16 @@ install: go.sum
|
||||
### Tools & dependencies
|
||||
|
||||
go.sum: go.mod
|
||||
@echo "--> Ensure dependencies have not been modified"
|
||||
@echo "--> Ensuring dependencies have not been modified"
|
||||
@go mod verify
|
||||
|
||||
clean:
|
||||
rm -rf build/
|
||||
|
||||
.PHONY: all build-linux install clean build
|
||||
########################################
|
||||
### Testing
|
||||
|
||||
sim:
|
||||
@go test -mod=readonly ./app -run TestFullAppSimulation -Enabled=true -NumBlocks=100 -BlockSize=200 -Commit=true -Seed=99 -Period=5 -v -timeout 24h
|
||||
|
||||
.PHONY: all build-linux install clean build sim
|
@ -343,7 +343,7 @@ func TestFullAppSimulation(t *testing.T) {
|
||||
}()
|
||||
|
||||
app := NewApp(logger, db, nil, true, simapp.FlagPeriodValue, fauxMerkleModeOpt)
|
||||
require.Equal(t, "GaiaApp", app.Name())
|
||||
require.Equal(t, "kava", app.Name())
|
||||
|
||||
// Run randomized simulation
|
||||
_, simParams, simErr := simulation.SimulateFromSeed(
|
||||
@ -397,7 +397,7 @@ func TestAppImportExport(t *testing.T) {
|
||||
}()
|
||||
|
||||
app := NewApp(logger, db, nil, true, simapp.FlagPeriodValue, fauxMerkleModeOpt)
|
||||
require.Equal(t, "SimApp", app.Name())
|
||||
require.Equal(t, "kava", app.Name())
|
||||
|
||||
// Run randomized simulation
|
||||
_, simParams, simErr := simulation.SimulateFromSeed(
|
||||
@ -441,7 +441,7 @@ func TestAppImportExport(t *testing.T) {
|
||||
}()
|
||||
|
||||
newApp := NewApp(log.NewNopLogger(), newDB, nil, true, simapp.FlagPeriodValue, fauxMerkleModeOpt)
|
||||
require.Equal(t, "SimApp", newApp.Name())
|
||||
require.Equal(t, "kava", newApp.Name())
|
||||
|
||||
var genesisState simapp.GenesisState
|
||||
err = app.cdc.UnmarshalJSON(appState, &genesisState)
|
||||
@ -513,7 +513,7 @@ func TestAppSimulationAfterImport(t *testing.T) {
|
||||
}()
|
||||
|
||||
app := NewApp(logger, db, nil, true, simapp.FlagPeriodValue, fauxMerkleModeOpt)
|
||||
require.Equal(t, "GaiaApp", app.Name())
|
||||
require.Equal(t, "kava", app.Name())
|
||||
|
||||
// Run randomized simulation
|
||||
// Run randomized simulation
|
||||
@ -567,7 +567,7 @@ func TestAppSimulationAfterImport(t *testing.T) {
|
||||
}()
|
||||
|
||||
newApp := NewApp(log.NewNopLogger(), newDB, nil, true, 0, fauxMerkleModeOpt)
|
||||
require.Equal(t, "GaiaApp", newApp.Name())
|
||||
require.Equal(t, "kava", newApp.Name())
|
||||
|
||||
newApp.InitChain(abci.RequestInitChain{
|
||||
AppStateBytes: appState,
|
||||
|
@ -11,4 +11,4 @@ go test -v -p 4 ./cli_test -tags cli_test
|
||||
|
||||
> NOTE: While the full suite runs in parallel, some of the tests can take up to a minute to complete
|
||||
|
||||
> NOTE: The tests will use the `kvd` or `kvcli` binaries in the build dir. Or in `$BUILDDIR` if that env var is set.
|
||||
> NOTE: The tests will use the `kvd` or `kvcli` binaries in the build dir. Or in `$BUILDDIR` if that env var is set.
|
||||
|
Loading…
Reference in New Issue
Block a user