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 TestWriteUpgradeCancelChannel to use table tests #4409

Closed
damiannolan opened this issue Aug 21, 2023 · 5 comments
Closed

Refactor TestWriteUpgradeCancelChannel to use table tests #4409

damiannolan opened this issue Aug 21, 2023 · 5 comments
Assignees
Labels
04-channel channel-upgradability Channel upgradability feature

Comments

@damiannolan
Copy link
Contributor

damiannolan commented Aug 21, 2023

Refactor TestWriteUpgradeCancelChannel to use table-driven tests.

Originally posted by @damiannolan in #4404 (comment)

@damiannolan damiannolan added 04-channel channel-upgradability Channel upgradability feature labels Aug 21, 2023
@damiannolan damiannolan added this to the 04-channel upgrades alpha milestone Aug 21, 2023
@damiannolan damiannolan moved this to Todo in ibc-go Aug 21, 2023
@faddat
Copy link
Contributor

faddat commented Aug 21, 2023

@damiannolan please assign @ThanhNhann to this task. He's amazing with tests.

@damiannolan
Copy link
Contributor Author

damiannolan commented Aug 21, 2023

That'd be awesome, thanks! I was thinking we could use this kind of test structure:

testCases := []struct{
    name string
    malleate func()
    expError error
}{
        {
             "success",
             func() {},
             nil,
        },
        // failure scenarios with expected error
}

We can take the existing test setup and move it to the test body and make some assertions based on the inputs of WriteUpgradeCancelChannel mutated by malleate().

I'll assign @ThanhNhann, feel free to make a PR and reach out if you've any questions

edit: cc @crodriguezvega for issue assignment, for some reason my GH assignees filter isn't finding @ThanhNhann

edit: @ThanhNhann you'll probably want to target the #4404 branch as upstream for now 👍

@DimitrisJim
Copy link
Contributor

I think @ThanhNhann might need to drop a comment here, assigning has some restrictions apparently https://docs.github.com/en/issues/tracking-your-work-with-issues/assigning-issues-and-pull-requests-to-other-github-users#about-issue-and-pull-request-assignees

@crodriguezvega
Copy link
Contributor

I think @ThanhNhann might need to drop a comment here, assigning has some restrictions apparently https://docs.github.com/en/issues/tracking-your-work-with-issues/assigning-issues-and-pull-requests-to-other-github-users#about-issue-and-pull-request-assignees

Yes, correct. @ThanhNhann needs to comment here first. :)

@ThanhNhann
Copy link
Contributor

ThanhNhann commented Aug 22, 2023

Hi all, I'm here now, plz assign me for this task 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
04-channel channel-upgradability Channel upgradability feature
Projects
Archived in project
Development

No branches or pull requests

5 participants