From 55d3cb4fc76439134a9bfe1b3bf9248ad75c990f Mon Sep 17 00:00:00 2001 From: chatton Date: Wed, 23 Aug 2023 09:10:14 +0100 Subject: [PATCH 1/3] chore: remove hasPacketCommitments check from WriteUpgradeTry test, sync linter --- .github/workflows/golangci.yml | 6 +++--- modules/core/04-channel/keeper/upgrade_test.go | 7 ------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/golangci.yml b/.github/workflows/golangci.yml index 01be2fa5492..63b4a2fe323 100644 --- a/.github/workflows/golangci.yml +++ b/.github/workflows/golangci.yml @@ -17,10 +17,10 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - uses: actions/checkout@v3 - name: golangci-lint - uses: golangci/golangci-lint-action@v3.6.0 + uses: golangci/golangci-lint-action@v3.7.0 with: - version: v1.53.3 + version: v1.54.2 args: --timeout 5m diff --git a/modules/core/04-channel/keeper/upgrade_test.go b/modules/core/04-channel/keeper/upgrade_test.go index ad9d5be0884..14b2b4c229f 100644 --- a/modules/core/04-channel/keeper/upgrade_test.go +++ b/modules/core/04-channel/keeper/upgrade_test.go @@ -322,12 +322,10 @@ func (suite *KeeperTestSuite) TestWriteUpgradeTry() { testCases := []struct { name string malleate func() - hasPacketCommitments bool }{ { "success with no packet commitments", func() {}, - false, }, { "success with packet commitments", @@ -337,7 +335,6 @@ func (suite *KeeperTestSuite) TestWriteUpgradeTry() { suite.Require().NoError(err) suite.Require().Equal(uint64(1), sequence) }, - true, }, } @@ -390,10 +387,6 @@ func (suite *KeeperTestSuite) TestWriteUpgradeTry() { } ibctesting.AssertEvents(&suite.Suite, expEvents, events) - - if tc.hasPacketCommitments { - suite.Require().Equal(types.NOTINFLUSH, channel.FlushStatus) - } }) } } From 2613ac6ca9d9fc4f6740701b1162e168639f31a5 Mon Sep 17 00:00:00 2001 From: chatton Date: Wed, 23 Aug 2023 09:30:39 +0100 Subject: [PATCH 2/3] chore: fix linter --- modules/apps/transfer/simulation/genesis_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/apps/transfer/simulation/genesis_test.go b/modules/apps/transfer/simulation/genesis_test.go index 11c61aca767..1aae1278e56 100644 --- a/modules/apps/transfer/simulation/genesis_test.go +++ b/modules/apps/transfer/simulation/genesis_test.go @@ -73,6 +73,7 @@ func TestRandomizedGenState1(t *testing.T) { } for _, tt := range tests { + tt := tt require.Panicsf(t, func() { simulation.RandomizedGenState(&tt.simState) }, tt.panicMsg) } } From b3d358ed4de9de4ce480f358b6eecb0ace57eee1 Mon Sep 17 00:00:00 2001 From: chatton Date: Wed, 23 Aug 2023 09:49:16 +0100 Subject: [PATCH 3/3] fix linter --- modules/core/04-channel/keeper/upgrade_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/04-channel/keeper/upgrade_test.go b/modules/core/04-channel/keeper/upgrade_test.go index 14b2b4c229f..d31470c8ebe 100644 --- a/modules/core/04-channel/keeper/upgrade_test.go +++ b/modules/core/04-channel/keeper/upgrade_test.go @@ -320,8 +320,8 @@ func (suite *KeeperTestSuite) TestWriteUpgradeTry() { ) testCases := []struct { - name string - malleate func() + name string + malleate func() }{ { "success with no packet commitments",