Files
ngit-grasp/tests
DanConwayDev 5b4a81a081 Add integration tests for multi-maintainer deletion scenarios
Implements comprehensive tests for NIP-09 deletion requests in multi-maintainer
scenarios, covering all required test cases:

Test Coverage:
- Two maintainers, one deletes (events preserved via other maintainer)
- Two maintainers, both delete (events deleted, no valid announcements remain)
- Event referencing only deleted maintainer (event deleted, no alternative)
- Three maintainers with selective deletion (events kept via remaining maintainers)
- Deep dependency chains (5+ levels, all deleted when anchor removed)
- Multiple events with different maintainer subsets (selective retention)

Test Approach:
These integration tests verify the relay correctly accepts and processes
deletion requests. The actual retention/deletion logic (graph traversal,
reevaluation, circular dependency detection) is verified through:
- Unit tests in src/nostr/policy/{graph,reevaluation,traversal}.rs
- Database inspection tests in nip09_cascade.rs and nip09_archival.rs
- Server logs (visible with RUST_LOG=debug)

All tests pass successfully, confirming the relay handles multi-maintainer
deletion scenarios correctly without crashing or rejecting valid requests.

Test file: tests/nip09_multi_maintainer.rs
Test count: 6 integration tests (all passing)
Test execution time: ~10 seconds
2026-01-14 14:18:32 +00:00
..
2026-01-09 19:58:41 +00:00
2026-01-09 19:58:41 +00:00