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(integration): port x/staking tests to server v2 #22813

Merged
merged 15 commits into from
Dec 18, 2024
31 changes: 0 additions & 31 deletions tests/integration/staking/app_config.go

This file was deleted.

214 changes: 0 additions & 214 deletions tests/integration/staking/keeper/common_test.go

This file was deleted.

32 changes: 0 additions & 32 deletions tests/integration/staking/module_test.go

This file was deleted.

8 changes: 4 additions & 4 deletions tests/integration/v2/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ type StartupConfig struct {
HeaderService header.Service
}

func DefaultStartUpConfig(t *testing.T) StartupConfig {
func DefaultStartUpConfig(t testing.TB) StartupConfig {
t.Helper()

priv := secp256k1.GenPrivKey()
Expand Down Expand Up @@ -345,10 +345,10 @@ func (a *App) Deliver(
}

// StateLatestContext creates returns a new context from context.Background() with the latest state.
func (a *App) StateLatestContext(t *testing.T) context.Context {
t.Helper()
func (a *App) StateLatestContext(tb testing.TB) context.Context {
tb.Helper()
_, state, err := a.Store.StateLatest()
require.NoError(t, err)
require.NoError(tb, err)
writeableState := branch.DefaultNewWriterMap(state)
iCtx := &integrationContext{state: writeableState}
return context.WithValue(context.Background(), contextKey, iCtx)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/v2/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func GasMeterFactory(ctx context.Context) func() gas.Meter {
}

func (s storeService) OpenKVStore(ctx context.Context) corestore.KVStore {
const gasLimit = 100_000
const gasLimit = 1_000_000
Copy link
Member

Choose a reason for hiding this comment

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

why the increase?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Few of deterministic tests are failing with out of gas issue.

iCtx, ok := ctx.Value(contextKey).(*integrationContext)
if !ok {
return s.executionService.OpenKVStore(ctx)
Expand Down
Loading
Loading