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

Refactor TestWriteUpgradeTry to remove flush status checks #4430

Merged
Show file tree
Hide file tree
Changes from all commits
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
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
Comment on lines +20 to +25
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated change to keep linters in sync for pre-commit

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we change to expPanics to cover the channel not found scenario (probably unreachable in the handshake)

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
Loading