package v2_test

// import (
// 	"testing"

// 	storetypes "cosmossdk.io/store/types"
// 	"github.com/cosmos/cosmos-sdk/testutil"
// 	sdk "github.com/cosmos/cosmos-sdk/types"
// 	moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
// 	"github.com/stretchr/testify/require"

// 	"github.com/archway-network/archway/x/rewards"
// 	"github.com/archway-network/archway/x/rewards/exported"
// 	v2 "github.com/archway-network/archway/x/rewards/migrations/v2"
// 	"github.com/archway-network/archway/x/rewards/types"
// )

// type mockSubspace struct {
// 	ps types.Params
// }

// func newMockSubspace(ps types.Params) mockSubspace {
// 	return mockSubspace{ps: ps}
// }

// func (ms mockSubspace) GetParamSet(_ sdk.Context, ps exported.ParamSet) {
// 	*ps.(*types.Params) = ms.ps
// }

// func TestMigrateStore(t *testing.T) {
// 	encCfg := moduletestutil.MakeTestEncodingConfig(rewards.AppModuleBasic{})
// 	cdc := encCfg.Codec

// 	storeKey := storetypes.NewKVStoreKey(types.ModuleName)
// 	tKey := storetypes.NewTransientStoreKey("transient_test")
// 	ctx := testutil.DefaultContext(storeKey, tKey)
// 	store := ctx.KVStore(storeKey)

// 	legacySubspace := newMockSubspace(types.DefaultParams())
// 	require.NoError(t, v2.MigrateStore(ctx, storeKey, legacySubspace, cdc))

// 	var res types.Params
// 	bz := store.Get(types.ParamsPrefix)
// 	require.NoError(t, cdc.Unmarshal(bz, &res))
// 	require.Equal(t, legacySubspace.ps, res)
// }
