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

chore: improve feeburner test cov #ntrn-328 #130

Conversation

NeverHappened
Copy link
Contributor

@NeverHappened NeverHappened commented Jan 20, 2023

improved coverage of feeburner.
to do that, needed to extract function from EndBlock
also changed to just panic if any error occurs during the process in EndBlock

https://github.com/neutron-org/neutron-tests/actions/runs/4084447916

@NeverHappened NeverHappened self-assigned this Jan 20, 2023
Copy link
Collaborator

@pr0n00gler pr0n00gler left a comment

Choose a reason for hiding this comment

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

Target branch must be neutron_audit_informal_17_01_2023

@NeverHappened NeverHappened changed the base branch from main to neutron_audit_informal_17_01_2023 January 20, 2023 09:17
@NeverHappened NeverHappened force-pushed the chore/improve-feeburner-test-cov branch from 80405b4 to 5e3093e Compare January 20, 2023 09:19
@@ -116,15 +116,15 @@ func (m *MockContractManagerKeeper) EXPECT() *MockContractManagerKeeperMockRecor
}

// AddContractFailure mocks base method.
func (m *MockContractManagerKeeper) AddContractFailure(ctx types.Context, channelId, address string, ackID uint64, ackType string) {
func (m *MockContractManagerKeeper) AddContractFailure(ctx types.Context, channelID, address string, ackID uint64, ackType string) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's just gomock output

fundsForTreasury,
)
if err != nil {
return fmt.Errorf("error sending funds to treasury for address=%s, tokens=%+v: %v", params.TreasuryAddress, fundsForTreasury, err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the specific reason of returning an error here? We panic everywhere in this method except this particular line.

Copy link
Contributor Author

@NeverHappened NeverHappened Jan 25, 2023

Choose a reason for hiding this comment

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

That's a bit out of scope). But:
I thought the reason was that it's okay to skip sending to treasury in this block, because we'll do again in later blocks anyway.
But now I think your point is valid actually, and this is not an okay behaviour.

@zavgorodnii zavgorodnii merged commit 7cfba1b into neutron_audit_informal_17_01_2023 Feb 7, 2023
@pr0n00gler pr0n00gler deleted the chore/improve-feeburner-test-cov branch September 18, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants