Skip to content

Commit

Permalink
cleaned up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
insumity committed Feb 5, 2024
1 parent 7e32fb7 commit 28f71c7
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions x/ccv/provider/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,11 @@ func TestGetOptedIn(t *testing.T) {
require.Equal(t, expectedOptedInValidators, actualOptedInValidators)
}

<<<<<<< HEAD
// TestOptedIn tests the `SetOptedIn`, `IsOptedIn`, and `DeleteOptedIn` methods
=======
// TestOptedIn tests the `SetOptedIn`, `IsOptedIn`, and `RemoveOptedIn` methods
>>>>>>> d8d7531f (cleaned up tests)
func TestOptedIn(t *testing.T) {
providerKeeper, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t))
defer ctrl.Finish()
Expand Down Expand Up @@ -748,12 +752,20 @@ func TestGetToBeOptedIn(t *testing.T) {

for _, addr := range expectedAddresses {
require.True(t, providerKeeper.IsToBeOptedIn(ctx, "chainID", addr))
<<<<<<< HEAD
providerKeeper.DeleteToBeOptedIn(ctx, "chainID", addr)
=======
providerKeeper.RemoveToBeOptedIn(ctx, "chainID", addr)
>>>>>>> d8d7531f (cleaned up tests)
require.False(t, providerKeeper.IsToBeOptedIn(ctx, "chainID", addr))
}
}

<<<<<<< HEAD
// TestToBeOptedIn tests the `SetToBeOptedIn`, `IsToBeOptedIn`, and `DeleteToBeOptedIn` methods
=======
// TestToBeOptedIn tests the `SetToBeOptedIn`, `IsToBeOptedIn`, and `RemoveToBeOptedIn` methods
>>>>>>> d8d7531f (cleaned up tests)
func TestToBeOptedIn(t *testing.T) {
providerKeeper, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t))
defer ctrl.Finish()
Expand All @@ -763,7 +775,11 @@ func TestToBeOptedIn(t *testing.T) {
require.False(t, providerKeeper.IsToBeOptedIn(ctx, "chainID", providerAddr))
providerKeeper.SetToBeOptedIn(ctx, "chainID", providerAddr)
require.True(t, providerKeeper.IsToBeOptedIn(ctx, "chainID", providerAddr))
<<<<<<< HEAD
providerKeeper.DeleteToBeOptedIn(ctx, "chainID", providerAddr)
=======
providerKeeper.RemoveToBeOptedIn(ctx, "chainID", providerAddr)
>>>>>>> d8d7531f (cleaned up tests)
require.False(t, providerKeeper.IsToBeOptedIn(ctx, "chainID", providerAddr))
}

Expand Down Expand Up @@ -796,12 +812,20 @@ func TestGetToBeOptedOut(t *testing.T) {

for _, addr := range expectedAddresses {
require.True(t, providerKeeper.IsToBeOptedOut(ctx, "chainID", addr))
<<<<<<< HEAD
providerKeeper.DeleteToBeOptedOut(ctx, "chainID", addr)
=======
providerKeeper.RemoveToBeOptedOut(ctx, "chainID", addr)
>>>>>>> d8d7531f (cleaned up tests)
require.False(t, providerKeeper.IsToBeOptedOut(ctx, "chainID", addr))
}
}

<<<<<<< HEAD
// TestToBeOptedOut tests the `SetToBeOptedOut`, `IsToBeOptedOut`, and `DeleteToBeOptedOut` methods
=======
// TestToBeOptedOut tests the `SetToBeOptedOut`, `IsToBeOptedOut`, and `RemoveToBeOptedOut` methods
>>>>>>> d8d7531f (cleaned up tests)
func TestToBeOptedOut(t *testing.T) {
providerKeeper, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t))
defer ctrl.Finish()
Expand All @@ -811,6 +835,10 @@ func TestToBeOptedOut(t *testing.T) {
require.False(t, providerKeeper.IsToBeOptedOut(ctx, "chainID", providerAddr))
providerKeeper.SetToBeOptedOut(ctx, "chainID", providerAddr)
require.True(t, providerKeeper.IsToBeOptedOut(ctx, "chainID", providerAddr))
<<<<<<< HEAD
providerKeeper.DeleteToBeOptedOut(ctx, "chainID", providerAddr)
=======
providerKeeper.RemoveToBeOptedOut(ctx, "chainID", providerAddr)
>>>>>>> d8d7531f (cleaned up tests)
require.False(t, providerKeeper.IsToBeOptedOut(ctx, "chainID", providerAddr))
}

0 comments on commit 28f71c7

Please sign in to comment.