spacedrive/.tasks/DEV-001-multi-process-test-framework.md
2025-09-06 21:00:37 -04:00

1.3 KiB

id, title, status, assignee, parent, priority, tags, whitepaper
id title status assignee parent priority tags whitepaper
DEV-001 Develop Multi-Process Test Framework Done james DEV-000 High
testing
dev-infra
networking
Section 6.3.1

Description

A custom testing framework will be built to validate complex, multi-device distributed scenarios directly within the Rust test suite. It orchestrates multiple cargo test subprocesses, each assuming a different device "role," to simulate real-world P2P interactions like pairing and file transfers.

Implementation Notes

  • The core runner will be implemented in src/test_framework/runner.rs.
  • Tests like device_pairing_test.rs and cross_device_copy_test.rs use this framework by defining distinct, #[ignore]-ed test functions for each role (e.g., alice_pairing_scenario, bob_pairing_scenario).
  • The main test function acts as an orchestrator, spawning the subprocesses and coordinating their interaction using the filesystem for signaling.

Acceptance Criteria

  • The framework can spawn multiple, isolated cargo test subprocesses.
  • Each subprocess can be assigned a unique role and data directory via environment variables.
  • The framework can coordinate and validate the outcomes of distributed tests (e.g., successful pairing).