chore: remove orphaned pytest config-generation code - #3775
Conversation
The generate-test-configs subcommand and its scaffolding were only ever invoked by the removed pytest suite (#3076). Removes the CLI command and its testing module, the CLI_FOR_PYTEST port seed, the now-dead TOTAL_DEFINED_PORTS constant, and the unused p2p_keypairs parameter of generate_test_p2p_configs.
Pull request overviewPure dead-code removal following the pytest suite removal in #3076. Deletes the Changes:
Reviewed changesPer-file summary
FindingsVerified:
No blocking or non-blocking issues found. ✅ Approved |
There was a problem hiding this comment.
Pull request overview
Removes leftover mpc-node CLI and P2P testing scaffolding that previously supported the (now-removed) pytest-based cluster, and simplifies the remaining Rust test configuration helper API.
Changes:
- Removes the
GenerateTestConfigsCLI subcommand and its#[cfg(feature = "test-utils")]scaffolding module fromcli.rs. - Removes now-unused
PortSeed::CLI_FOR_PYTESTand the unusedTOTAL_DEFINED_PORTSconstant fromp2p::testing. - Simplifies
p2p::testing::generate_test_p2p_configsby dropping the unusedp2p_keypairsparameter and updating in-tree call sites accordingly.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/node/src/cli.rs | Removes the orphaned GenerateTestConfigs command and its supporting test-config generation module. |
| crates/node/src/p2p.rs | Removes pytest-specific port seed/constants and simplifies generate_test_p2p_configs’s signature/implementation. |
| crates/node/src/tests.rs | Updates integration test setup to call the updated generate_test_p2p_configs signature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // this is a hack to make sure that when tests run in parallel, they don't | ||
| // collide on the same port. | ||
| port_seed: PortSeed, | ||
| // Supply `Some` value here if you want to use pre-existing p2p key pairs | ||
| p2p_keypairs: Option<Vec<SigningKey>>, | ||
| ) -> anyhow::Result<Vec<(MpcConfig, SigningKey)>> { |
Closes #3773
Pure dead-code removal. The
generate-test-configssubcommand and its scaffolding were only ever invoked by the pytest suite removed in #3076; nothing in the current tree calls it, and it lived behind#[cfg(feature = "test-utils")]so it was never in production binaries.Removes:
GenerateTestConfigsCLI command + match arm and thetestingmodule incli.rsCLI_FOR_PYTESTport seed and the now-deadTOTAL_DEFINED_PORTSconstant inp2p.rsp2p_keypairsparameter ofgenerate_test_p2p_configs(thetestingmodule was its onlySome(...)caller; all four remaining callers passedNone)The
test-utilsfeature stays (still used bykeyshare.rs,migration_service/web.rs,p2p::testing, andbackup-cli).generate_test_p2p_configsremains and is still exercised by the mpc-node cluster/integration tests, which pass.