Skip to content

Commit

Permalink
chore: using pre-defined flag variables (#21794)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilasxie authored Sep 18, 2024
1 parent 6f1dae9 commit f283f0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions server/v2/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ func TestReadConfig(t *testing.T) {
v, err := serverv2.ReadConfig(configPath)
require.NoError(t, err)

require.Equal(t, v.GetString("grpc.address"), grpc.DefaultConfig().Address)
require.Equal(t, v.GetString("store.app-db-backend"), store.DefaultConfig().AppDBBackend)
require.Equal(t, v.GetString(grpc.FlagAddress), grpc.DefaultConfig().Address)
require.Equal(t, v.GetString(store.FlagAppDBBackend), store.DefaultConfig().AppDBBackend)
}

func TestUnmarshalSubConfig(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion simapp/v2/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
sdkmath "cosmossdk.io/math"
serverv2 "cosmossdk.io/server/v2"
comettypes "cosmossdk.io/server/v2/cometbft/types"
serverv2store "cosmossdk.io/server/v2/store"
"cosmossdk.io/store/v2/db"
banktypes "cosmossdk.io/x/bank/types"

Expand All @@ -36,7 +37,7 @@ func NewTestApp(t *testing.T) (*SimApp[transaction.Tx], context.Context) {
logger := log.NewTestLogger(t)

vp := viper.New()
vp.Set("store.app-db-backend", string(db.DBTypeGoLevelDB))
vp.Set(serverv2store.FlagAppDBBackend, string(db.DBTypeGoLevelDB))
vp.Set(serverv2.FlagHome, t.TempDir())

app := NewSimApp[transaction.Tx](logger, vp)
Expand Down

0 comments on commit f283f0c

Please sign in to comment.