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

test: increase test coverage for governance params #3007

Merged
merged 19 commits into from
Jan 29, 2024

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Jan 11, 2024

Closes #2916 with heavy inspiration from PRs by @fahimahmedx
Opens #2972

fahimahmedx and others added 8 commits January 11, 2024 14:07
add auth, blob, blobstream, and consensus governance param tests

add governance params tests for distribution

add tests for modifying gov params

add tests for modifying ibc params

add tests for modifying slashing params

add tests for modifying staking params

ci: remove version_bump job (celestiaorg#2962)

Closes celestiaorg#2884

- Remove the version_bump and branch_name jobs
- Extract the goreleaser jobs to a new file

Can still create a release. See
https://github.com/rootulp/celestia-app/actions/runs/7324051789/job/19947265102

docs: add column for governance modifiable params in resource_pricing (celestiaorg#2974)

Addresses celestiaorg#2966 by using the governance modifiable params tests in PR
All four of the params are modifiable by governance, which matches the
specs in
[params.md](https://github.com/celestiaorg/celestia-app/blob/main/specs/src/specs/params.md).

- [x] New and updated code has appropriate documentation
- [x] New and updated code has new and/or updated testing
- [x] Required CI checks are passing
- [x] Visual proof for any user facing features like CLI or
documentation updates
- [ ] Linked issues closed with keywords

chore: remove unnecessary conversions (celestiaorg#2975)

Use linter to detect unnecessary type conversions
https://github.com/mdempsky/unconvert

ci: enable govulncheck (celestiaorg#2969)

Closes celestiaorg#2968
Supersedes celestiaorg#2744

- CI workflow is inspired by
https://github.com/celestiaorg/celestia-core/blob/main/.github/workflows/govulncheck.yml
- Bumped to Go 1.21.5 to resolve some vulnerabilities identified by
govulncheck

improve naming of governance params test suite

fix govHandler and remove test for an unmodifiable param.

remove unneeded minter setup
@rootulp rootulp self-assigned this Jan 11, 2024
@rootulp rootulp added testing items that are strictly related to adding or extending test coverage specs directly relevant to the specs labels Jan 11, 2024
@rootulp rootulp marked this pull request as ready for review January 18, 2024 19:34
Copy link
Contributor

coderabbitai bot commented Jan 18, 2024

Walkthrough

The update introduces a test suite dedicated to ensuring the governance modifiability of parameters as specified in the project documentation. It verifies that parameters marked as modifiable can indeed be altered through governance proposals and that those marked as non-modifiable are resistant to such changes. This enhances the robustness of the project's governance mechanisms by aligning automated testing with the governance specifications.

Changes

File Path Change Summary
.../paramfilter/test/gov_params_test.go Added tests for verifying governance modifiability and non-modifiability of parameters as per specifications.

Assessment against linked issues

Objective Addressed Explanation
Increase test coverage for governance modifiable and unmodifiable params (#2916) The addition of gov_params_test.go directly addresses the issue by implementing tests for each parameter's governance modifiability as outlined in the specs.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

Note: Auto-reply has been disabled for this repository by the repository owner. The CodeRabbit bot will not respond to your comments unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

cmwaters
cmwaters previously approved these changes Jan 18, 2024
Copy link
Contributor

@cmwaters cmwaters left a comment

Choose a reason for hiding this comment

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

LGTM

x/paramfilter/test/gov_params_test.go Show resolved Hide resolved
@rootulp rootulp removed the specs directly relevant to the specs label Jan 23, 2024
Copy link
Collaborator

@staheri14 staheri14 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 to me, added some suggestions to perform some additional checks in the unmodifiable params tests.

x/paramfilter/test/gov_params_test.go Show resolved Hide resolved
x/paramfilter/test/gov_params_test.go Outdated Show resolved Hide resolved
x/paramfilter/test/gov_params_test.go Outdated Show resolved Hide resolved
staheri14
staheri14 previously approved these changes Jan 24, 2024
Copy link
Collaborator

@staheri14 staheri14 left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the comments, LGTM!

evan-forbes
evan-forbes previously approved these changes Jan 24, 2024
@rootulp rootulp dismissed stale reviews from evan-forbes and staheri14 via a20fd42 January 25, 2024 03:27
@celestia-bot celestia-bot requested a review from a team January 25, 2024 03:27
@rootulp rootulp enabled auto-merge (squash) January 25, 2024 03:28
@rootulp rootulp requested review from evan-forbes and staheri14 and removed request for a team, cmwaters and ninabarbakadze January 25, 2024 03:28
@rootulp rootulp requested review from cmwaters, ninabarbakadze and evan-forbes and removed request for evan-forbes January 26, 2024 19:54
@rootulp
Copy link
Collaborator Author

rootulp commented Jan 26, 2024

Hoping to get this merged before another go.work.sum merge conflict shows up 💀

@rootulp rootulp merged commit 88b58cf into celestiaorg:main Jan 29, 2024
29 checks passed
@rootulp rootulp deleted the rp/gov-tests branch January 29, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing items that are strictly related to adding or extending test coverage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase test coverage for governance modifiable and governance unmodifiable params
5 participants