-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
Summary:
Move integration tests from src/tests/ to tests/ directory following rust conventions. Unit tests requiring private interfaces stay in src/.
Structure:
crates/
├── metering/
│ ├── src/
│ │ ├── meter.rs # Unit tests stay here (with #[cfg(test)])
│ │ └── rpc.rs # Unit tests stay here (with #[cfg(test)])
│ └── tests/ # Integration tests (12 tests)
│ ├── common/mod.rs
│ ├── rpc.rs
│ └── meter.rs
└── flashblocks-rpc/
├── src/
│ ├── state.rs # Inline unit tests stay here
│ └── ... # Other modules keep their unit tests
└── tests/ # Integration tests (24 tests)
├── common/mod.rs
├── rpc.rs
└── state.rsBenefits:
- Integration tests in separate crate - tests public API only, validates external interface
- Unit tests stay in src/ - still have access to private functions/types when needed
- Clear separation - integration/E2E in tests/, unit tests in src/
- Foundation for improve
eth_calltests to have more real-world scenarios #151 - easy to add ERC-20, proxy contract, real-world scenario tests - Standard Rust layout - easier for contributors to navigate
As the repo develops, new tests are required. I believe it's time for a clear division between the two types of tests, so it will be easier for new contributors to write new tests with the right approach.
Metadata
Metadata
Assignees
Labels
No labels