Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make all keeper testsuite vars pointer receivers #5961

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions modules/core/02-client/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (suite *KeeperTestSuite) TestValidateSelfClient() {
}
}

func (suite KeeperTestSuite) TestGetAllGenesisClients() { //nolint:govet // this is a test, we are okay with copying locks
func (suite *KeeperTestSuite) TestGetAllGenesisClients() {
clientIDs := []string{
exported.LocalhostClientID, testClientID2, testClientID3, testClientID,
}
Expand All @@ -252,7 +252,7 @@ func (suite KeeperTestSuite) TestGetAllGenesisClients() { //nolint:govet // this
suite.Require().Equal(expGenClients.Sort(), genClients)
}

func (suite KeeperTestSuite) TestGetAllGenesisMetadata() { //nolint:govet // this is a test, we are okay with copying locks
func (suite *KeeperTestSuite) TestGetAllGenesisMetadata() {
clientA, clientB := "07-tendermint-1", "clientB"

// create some starting state
Expand Down Expand Up @@ -308,7 +308,7 @@ func (suite KeeperTestSuite) TestGetAllGenesisMetadata() { //nolint:govet // thi
})
}

func (suite KeeperTestSuite) TestGetConsensusState() { //nolint:govet // this is a test, we are okay with copying locks
func (suite *KeeperTestSuite) TestGetConsensusState() {
suite.ctx = suite.ctx.WithBlockHeight(10)
cases := []struct {
name string
Expand Down Expand Up @@ -336,7 +336,7 @@ func (suite KeeperTestSuite) TestGetConsensusState() { //nolint:govet // this is

// 2 clients in total are created on chainA. The first client is updated so it contains an initial consensus state
// and a consensus state at the update height.
func (suite KeeperTestSuite) TestGetAllConsensusStates() { //nolint:govet // this is a test, we are okay with copying locks
func (suite *KeeperTestSuite) TestGetAllConsensusStates() {
path := ibctesting.NewPath(suite.chainA, suite.chainB)
path.SetupClients()

Expand Down Expand Up @@ -385,7 +385,7 @@ func (suite KeeperTestSuite) TestGetAllConsensusStates() { //nolint:govet // thi
suite.Require().Equal(expConsensusStates, consStates, "%s \n\n%s", expConsensusStates, consStates)
}

func (suite KeeperTestSuite) TestIterateClientStates() { //nolint:govet // this is a test, we are okay with copying locks
func (suite *KeeperTestSuite) TestIterateClientStates() {
paths := []*ibctesting.Path{
ibctesting.NewPath(suite.chainA, suite.chainB),
ibctesting.NewPath(suite.chainA, suite.chainB),
Expand Down
4 changes: 2 additions & 2 deletions modules/core/03-connection/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (suite *KeeperTestSuite) TestSetAndGetClientConnectionPaths() {
}

// create 2 connections: A0 - B0, A1 - B1
func (suite KeeperTestSuite) TestGetAllConnections() { //nolint:govet // this is a test, we are okay with copying locks
func (suite *KeeperTestSuite) TestGetAllConnections() {
path1 := ibctesting.NewPath(suite.chainA, suite.chainB)
path1.SetupConnections()

Expand Down Expand Up @@ -93,7 +93,7 @@ func (suite KeeperTestSuite) TestGetAllConnections() { //nolint:govet // this is

// the test creates 2 clients path.EndpointA.ClientID0 and path.EndpointA.ClientID1. path.EndpointA.ClientID0 has a single
// connection and path.EndpointA.ClientID1 has 2 connections.
func (suite KeeperTestSuite) TestGetAllClientConnectionPaths() { //nolint:govet // this is a test, we are okay with copying locks
func (suite *KeeperTestSuite) TestGetAllClientConnectionPaths() {
path1 := ibctesting.NewPath(suite.chainA, suite.chainB)
path2 := ibctesting.NewPath(suite.chainA, suite.chainB)
path1.SetupConnections()
Expand Down
6 changes: 3 additions & 3 deletions modules/core/04-channel/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func containsAll(expected, actual []types.IdentifiedChannel) bool {

// TestGetAllChannels creates multiple channels on chain A through various connections
// and tests their retrieval. 2 channels are on connA0 and 1 channel is on connA1
func (suite KeeperTestSuite) TestGetAllChannels() { //nolint:govet // this is a test, we are okay with copying locks
func (suite *KeeperTestSuite) TestGetAllChannels() {
path := ibctesting.NewPath(suite.chainA, suite.chainB)
path.Setup()
// channel0 on first connection on chainA
Expand Down Expand Up @@ -234,7 +234,7 @@ func (suite KeeperTestSuite) TestGetAllChannels() { //nolint:govet // this is a

// TestGetAllSequences sets all packet sequences for two different channels on chain A and
// tests their retrieval.
func (suite KeeperTestSuite) TestGetAllSequences() { //nolint:govet // this is a test, we are okay with copying locks
func (suite *KeeperTestSuite) TestGetAllSequences() {
path := ibctesting.NewPath(suite.chainA, suite.chainB)
path.Setup()

Expand Down Expand Up @@ -276,7 +276,7 @@ func (suite KeeperTestSuite) TestGetAllSequences() { //nolint:govet // this is a

// TestGetAllPacketState creates a set of acks, packet commitments, and receipts on two different
// channels on chain A and tests their retrieval.
func (suite KeeperTestSuite) TestGetAllPacketState() { //nolint:govet // this is a test, we are okay with copying locks
func (suite *KeeperTestSuite) TestGetAllPacketState() {
path := ibctesting.NewPath(suite.chainA, suite.chainB)
path.Setup()

Expand Down
Loading