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

Added tests for changing admin/upgrading protocol via governance #21

Merged
merged 6 commits into from
Dec 28, 2023

Conversation

jferas
Copy link
Contributor

@jferas jferas commented Dec 8, 2023

Added test for changing admin via governance

Add Drips protocol upgrade via governance tests

@@ -118,6 +164,34 @@ abstract contract RadworksDripsGovernance is ProposalTest {
// Ensure the admin role has been renounced
assertEq(drips.admin(), address(0));
}

function test_proposeNewAdminViaGovernance(address _newAdmin) public {

Choose a reason for hiding this comment

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

Name should be testFuzz_ProposaNewAdminViaGovernance

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done: ec11571

Copy link

@alexkeating alexkeating left a comment

Choose a reason for hiding this comment

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

Looks good, two small changes left but should be good to merge after

import {ProposalTest} from "test/helpers/ProposalTest.sol";

import {console2} from "forge-std/console2.sol";

Choose a reason for hiding this comment

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

Leftover console2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done: 8706cb8

import {ProposalTest} from "test/helpers/ProposalTest.sol";

import {console2} from "forge-std/console2.sol";

/// @dev This contract used in the testing of using governance to upgrade the Drips protocol

Choose a reason for hiding this comment

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

"is used in the testing of governance to upgrade the Drips protocol*.*" this sounds a little better

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done: 79efaea

Copy link
Contributor

@wildmolasses wildmolasses left a comment

Choose a reason for hiding this comment

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

lgtm after alex's suggestions

@jferas jferas changed the base branch from drips-tests to main December 28, 2023 15:56
Copy link

Coverage after merging drips-admin-tests into drips-tests will be

76.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   RadworksGovernor.sol73.91%75%69.23%76%101, 126–127, 135, 138, 152, 203, 84

@jferas jferas merged commit 5130b93 into main Dec 28, 2023
11 checks passed
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.

3 participants