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: separate sequencer testing only utils and utils shared with benchmark feature #1585

Closed
ethanoroshiba opened this issue Sep 27, 2024 · 0 comments · Fixed by #1613
Closed
Assignees
Labels
code-quality sequencer pertaining to the astria-sequencer crate

Comments

@ethanoroshiba
Copy link
Contributor

ethanoroshiba commented Sep 27, 2024

We should figure out a way to get rid of this and the others in this file. Unfortunately, we cannot replace allow inside cfg_attr with expect, since clippy evaluates it even when the benchmark feature is not enabled and errs with unfulfilled_lint_expectations.

#[expect(
clippy::allow_attributes,
clippy::allow_attributes_without_reason,
reason = "allow is only necessary when benchmark isn't enabled"
)]
#[cfg_attr(feature = "benchmark", allow(dead_code))]
pub(crate) fn get_alice_signing_key() -> SigningKey {

┆Issue Number: ENG-877

@ethanoroshiba ethanoroshiba added sequencer pertaining to the astria-sequencer crate code-quality labels Sep 27, 2024
@ethanoroshiba ethanoroshiba self-assigned this Oct 2, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 29, 2024
…utils (#1613)

## Summary
Separated utils only used by tests from utils used by both benchmarks
and tests.

## Background
This is to get rid of many strings of nested `expect`s and `allow`s
mentioned in #1585

## Changes
- Separated `astria-sequencer::test_utils.rs` into `test_utils.rs` and
`benchmark_and_test_utils.rs`.
- Separated `astria-sequencer::app::test_utils.rs` into
`app::test_utils.rs` and `app::benchmark_and_test_utils.rs`.
- Fixed all the imports which broke as a result.

## Testing
All tests working

## Related Issues
closes #1585
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-quality sequencer pertaining to the astria-sequencer crate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant