From c646504624c92541df683b498a155a6a70ce33c7 Mon Sep 17 00:00:00 2001 From: leonz789 Date: Wed, 20 Mar 2024 16:31:01 +0800 Subject: [PATCH] refactor: remove unused ginkgo --- x/delegation/keeper/setup_test.go | 7 +------ x/deposit/keeper/setup_test.go | 8 +------- x/restaking_assets_manage/keeper/setup_test.go | 7 +------ x/reward/keeper/setup_test.go | 9 +-------- x/slash/keeper/setup_test.go | 10 +--------- x/withdraw/keeper/setup_test.go | 11 ++--------- 6 files changed, 7 insertions(+), 45 deletions(-) diff --git a/x/delegation/keeper/setup_test.go b/x/delegation/keeper/setup_test.go index c139e4874..5548d2306 100644 --- a/x/delegation/keeper/setup_test.go +++ b/x/delegation/keeper/setup_test.go @@ -1,11 +1,9 @@ package keeper_test import ( - "github.com/ExocoreNetwork/exocore/testutil" "testing" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" + "github.com/ExocoreNetwork/exocore/testutil" "github.com/stretchr/testify/suite" ) @@ -20,9 +18,6 @@ func TestKeeperTestSuite(t *testing.T) { s = new(DelegationTestSuite) suite.Run(t, s) - // Run Ginkgo integration tests - RegisterFailHandler(Fail) - RunSpecs(t, "Keeper Suite") } func (suite *DelegationTestSuite) SetupTest() { diff --git a/x/deposit/keeper/setup_test.go b/x/deposit/keeper/setup_test.go index c6b43ccc3..cc891fe42 100644 --- a/x/deposit/keeper/setup_test.go +++ b/x/deposit/keeper/setup_test.go @@ -1,11 +1,9 @@ package keeper_test import ( - "github.com/ExocoreNetwork/exocore/testutil" "testing" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" + "github.com/ExocoreNetwork/exocore/testutil" "github.com/stretchr/testify/suite" ) @@ -19,10 +17,6 @@ var s *DepositTestSuite func TestKeeperTestSuite(t *testing.T) { s = new(DepositTestSuite) suite.Run(t, s) - - // Run Ginkgo integration tests - RegisterFailHandler(Fail) - RunSpecs(t, "Keeper Suite") } func (suite *DepositTestSuite) SetupTest() { diff --git a/x/restaking_assets_manage/keeper/setup_test.go b/x/restaking_assets_manage/keeper/setup_test.go index 21d80f32f..1bcb40b43 100644 --- a/x/restaking_assets_manage/keeper/setup_test.go +++ b/x/restaking_assets_manage/keeper/setup_test.go @@ -1,11 +1,9 @@ package keeper_test import ( - "github.com/ExocoreNetwork/exocore/testutil" "testing" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" + "github.com/ExocoreNetwork/exocore/testutil" "github.com/stretchr/testify/suite" ) @@ -20,9 +18,6 @@ func TestKeeperTestSuite(t *testing.T) { s = new(StakingAssetsTestSuite) suite.Run(t, s) - // Run Ginkgo integration tests - RegisterFailHandler(Fail) - RunSpecs(t, "Keeper Suite") } func (suite *StakingAssetsTestSuite) SetupTest() { diff --git a/x/reward/keeper/setup_test.go b/x/reward/keeper/setup_test.go index 1927a5b17..df09bc953 100644 --- a/x/reward/keeper/setup_test.go +++ b/x/reward/keeper/setup_test.go @@ -1,13 +1,9 @@ package keeper_test import ( - "github.com/ExocoreNetwork/exocore/testutil" "testing" - //nolint:revive // dot imports are fine for Ginkgo - . "github.com/onsi/ginkgo/v2" - //nolint:revive // dot imports are fine for Ginkgo - . "github.com/onsi/gomega" + "github.com/ExocoreNetwork/exocore/testutil" "github.com/stretchr/testify/suite" ) @@ -22,9 +18,6 @@ func TestKeeperTestSuite(t *testing.T) { s = new(RewardTestSuite) suite.Run(t, s) - // Run Ginkgo integration tests - RegisterFailHandler(Fail) - RunSpecs(t, "Keeper Suite") } // SetupTest setup test environment, it uses`require.TestingT` to support both `testing.T` and `testing.B`. diff --git a/x/slash/keeper/setup_test.go b/x/slash/keeper/setup_test.go index cf45470b0..9cad0a10a 100644 --- a/x/slash/keeper/setup_test.go +++ b/x/slash/keeper/setup_test.go @@ -1,13 +1,9 @@ package keeper_test import ( - "github.com/ExocoreNetwork/exocore/testutil" "testing" - //nolint:revive // dot imports are fine for Ginkgo - . "github.com/onsi/ginkgo/v2" - //nolint:revive // dot imports are fine for Ginkgo - . "github.com/onsi/gomega" + "github.com/ExocoreNetwork/exocore/testutil" "github.com/stretchr/testify/suite" ) @@ -21,10 +17,6 @@ var s *SlashTestSuite func TestKeeperTestSuite(t *testing.T) { s = new(SlashTestSuite) suite.Run(t, s) - - // Run Ginkgo integration tests - RegisterFailHandler(Fail) - RunSpecs(t, "Keeper Suite") } // SetupTest setup test environment, it uses`require.TestingT` to support both `testing.T` and `testing.B`. diff --git a/x/withdraw/keeper/setup_test.go b/x/withdraw/keeper/setup_test.go index 9dd0c641a..fe9eb12e1 100644 --- a/x/withdraw/keeper/setup_test.go +++ b/x/withdraw/keeper/setup_test.go @@ -1,13 +1,10 @@ package keeper_test import ( - "github.com/ExocoreNetwork/exocore/testutil" "testing" - //nolint:revive // dot imports are fine for Ginkgo - . "github.com/onsi/ginkgo/v2" - //nolint:revive // dot imports are fine for Ginkgo - . "github.com/onsi/gomega" + "github.com/ExocoreNetwork/exocore/testutil" + "github.com/stretchr/testify/suite" ) @@ -20,10 +17,6 @@ var s *WithdrawTestSuite func TestKeeperTestSuite(t *testing.T) { s = new(WithdrawTestSuite) suite.Run(t, s) - - // Run Ginkgo integration tests - RegisterFailHandler(Fail) - RunSpecs(t, "Keeper Suite") } // SetupTest setup test environment, it uses`require.TestingT` to support both `testing.T` and `testing.B`.