Skip to content

Commit

Permalink
chore: removed migration unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
troykessler committed Jun 4, 2024
1 parent 6aefa95 commit 495de42
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions x/funders/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ import (
"fmt"
"testing"

"github.com/KYVENetwork/chain/app/upgrades/v1_5"
fundersOld "github.com/KYVENetwork/chain/app/upgrades/v1_5/v1_4_types/funders"
i "github.com/KYVENetwork/chain/testutil/integration"
globalTypes "github.com/KYVENetwork/chain/x/global/types"

"github.com/KYVENetwork/chain/x/funders/types"

. "github.com/onsi/ginkgo/v2"
Expand All @@ -19,38 +14,3 @@ func TestFundersKeeper(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, fmt.Sprintf("x/%s Keeper Test Suite", types.ModuleName))
}

var _ = Describe("funders migrations", Ordered, func() {
s := i.NewCleanChain()

BeforeEach(func() {
s = i.NewCleanChain()
})

It("v1.5", func() {
// this panics
// storeService := runtime.NewKVStoreService(storeTypes.NewKVStoreKey(types.StoreKey))
// store := runtime.KVStoreAdapter(storeService.OpenKVStore(s.Ctx()))
// fmt.Println(store.Get([]byte("test")))

// ARRANGE
storeKey := v1_5.MustGetStoreKey(s.App().GetStoreKeys(), types.ModuleName)
fundersOld.SetParams(s.Ctx(), s.App().AppCodec(), storeKey, fundersOld.Params{
MinFundingAmount: 1,
MinFundingAmountPerBundle: 2,
MinFundingMultiple: 3,
})

// ACT
v1_5.MigrateFundersModule(s.Ctx(), s.App().AppCodec(), storeKey, s.App().FundersKeeper)

// ASSERT
params := s.App().FundersKeeper.GetParams(s.Ctx())

Expect(params.MinFundingMultiple).To(Equal(uint64(3)))
Expect(params.CoinWhitelist).To(HaveLen(1))
Expect(params.CoinWhitelist[0].CoinDenom).To(Equal(globalTypes.Denom))
Expect(params.CoinWhitelist[0].MinFundingAmount).To(Equal(uint64(1)))
Expect(params.CoinWhitelist[0].MinFundingAmountPerBundle).To(Equal(uint64(2)))
})
})

0 comments on commit 495de42

Please sign in to comment.