Integration tests ergonomics (#7836)

Fixes #7785


  - [x] Update all integration tests with >1 files to follow the `main` pattern.
- [x] `crypto/eth2_key_derivation/tests`
- [x] `crypto/eth2_keystore/tests`
- [x] `crypto/eth2_wallet/tests`
- [x] `slasher/tests`
- [x] `common/eth2_interop_keypairs/tests`
- [x] `beacon_node/lighthouse_network/tests`
- [x] Set `debug_assertions` to false on `.vscode/settings.json`.
- [x] Document how to make rust analyzer work on integration tests files. In `book/src/contributing_setup.md`

---

Tracking a `rust-analyzer.toml` with settings like the one provided in `.vscode/settings.json` would be nicer. But this is not possible yet. For now, that config should be a good enough indicator for devs using editors different to VSCode.


Co-Authored-By: Daniel Ramirez-Chiquillo <hi@danielrachi.com>

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
Daniel
2025-11-27 00:53:57 -05:00
committed by GitHub
parent 070e395714
commit e291955400
16 changed files with 98 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ name = "lighthouse_network"
version = "0.2.0"
authors = ["Sigma Prime <contact@sigmaprime.io>"]
edition = { workspace = true }
autotests = false
[features]
libp2p-websocket = []
@@ -74,3 +75,7 @@ async-channel = { workspace = true }
logging = { workspace = true }
proptest = { workspace = true }
tempfile = { workspace = true }
[[test]]
name = "lighthouse_network_tests"
path = "tests/main.rs"

View File

@@ -0,0 +1,2 @@
mod common;
mod rpc_tests;

View File

@@ -1,9 +1,8 @@
#![cfg(test)]
mod common;
use crate::common;
use crate::common::spec_with_all_forks_enabled;
use common::{Protocol, build_tracing_subscriber};
use crate::common::{Protocol, build_tracing_subscriber};
use lighthouse_network::rpc::{RequestType, methods::*};
use lighthouse_network::service::api_types::AppRequestId;
use lighthouse_network::{NetworkEvent, ReportSource, Response};