Skip to content

Commit

Permalink
Refactor TestWriteUpgradeTry to remove flush status checks (#4430)
Browse files Browse the repository at this point in the history
  • Loading branch information
chatton authored Aug 24, 2023
1 parent f230633 commit 5b1071d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions modules/apps/transfer/simulation/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
11 changes: 2 additions & 9 deletions modules/core/04-channel/keeper/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,12 @@ func (suite *KeeperTestSuite) TestWriteUpgradeTry() {
)

testCases := []struct {
name string
malleate func()
hasPacketCommitments bool
name string
malleate func()
}{
{
"success with no packet commitments",
func() {},
false,
},
{
"success with packet commitments",
Expand All @@ -337,7 +335,6 @@ func (suite *KeeperTestSuite) TestWriteUpgradeTry() {
suite.Require().NoError(err)
suite.Require().Equal(uint64(1), sequence)
},
true,
},
}

Expand Down Expand Up @@ -391,10 +388,6 @@ func (suite *KeeperTestSuite) TestWriteUpgradeTry() {
}

ibctesting.AssertEvents(&suite.Suite, expEvents, events)

if tc.hasPacketCommitments {
suite.Require().Equal(types.NOTINFLUSH, channel.FlushStatus)
}
})
}
}
Expand Down

0 comments on commit 5b1071d

Please sign in to comment.