Skip to content

Commit

Permalink
chore: make all keeper testsuite vars pointer receivers (#5961)
Browse files Browse the repository at this point in the history
  • Loading branch information
damiannolan authored Mar 12, 2024
1 parent 213e3e8 commit 3318278
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
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

0 comments on commit 3318278

Please sign in to comment.