Skip to content

fix(tests): compile the test suite without default features - #24

Merged
seemenkina merged 1 commit into
mainfrom
fix/no-default-features-tests
Sep 7, 2026
Merged

seemenkina merged 1 commit into
mainfrom
fix/no-default-features-tests

Conversation

@seemenkina

@seemenkina seemenkina commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

cargo test --no-default-features --tests has not compiled since the ethereum feature was made optional in 0.5.0 (PR #19): the library was gated correctly, the tests were not. The session.rs unit tests and eight integration test files imported alloy unconditionally, and CI only ever ran with --all-features, so nobody saw it.

Changes

  • tests/common/mod.rs: now_ts stays unconditional; the five alloy-backed helpers move into a submodule gated on ethereum and are re-exported.
  • Eight integration test files get #![cfg(feature = "ethereum")]. threshold_tests.rs and custom_scheme_tests.rs need no signer and still run without the feature.
  • src/session.rs: unit test module gated on all(test, feature = "ethereum"). The config builder test in that module did not need alloy but is skipped without the feature rather than splitting the module for one test.
  • CI: added cargo clippy --no-default-features --tests -- -D warnings and cargo test --no-default-features --tests.
  • Changelog bullet under 0.7.0. No version change.

Since the ethereum feature was made optional in 0.5.0, the session.rs unit
tests and most integration tests imported alloy unconditionally, so
`cargo test --no-default-features --tests` failed to compile while the
library itself built fine. Gate those tests behind the ethereum feature,
keep the shared time helper unconditional, and run clippy and the test
suite with --no-default-features in CI so it cannot regress.
@seemenkina
seemenkina merged commit 70727db into main Sep 7, 2026
3 checks passed
@seemenkina
seemenkina deleted the fix/no-default-features-tests branch September 7, 2026 11:11
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.

1 participant