Files
ngit-grasp/tests/common/mod.rs
T
DanConwayDev 58f2dce91b test: migrate tests and grasp-audit to rust-nostr 0.45.0-alpha.1
Complete the 0.45 migration for the integration tests (tests/) and the
grasp-audit workspace member.

- TagKind removed throughout: Tag::custom takes string literals;
  tag.kind() compared as &str; ref-name matches use the raw string.
- EventBuilder finalize traits brought into scope where needed;
  Keys::sign_event is now sync (SignEvent trait).
- Client API: new() is no-arg, NIP-42 auth via
  ClientBuilder::authenticator(SignerAuthenticator::new(keys));
  fetch_events(filter).timeout(d); subscribe(filter); sync(filter).opts();
  Output.val -> Output.value; Relay status via relay.status().is_connected().
- MemoryDatabase via nostr_memory (unbounded/bounded).
- hashes imports moved from nostr_sdk::hashes to nostr::hashes.
- SyncSummary.remote/received are now maps keyed by EventId.

cargo build, cargo build --tests, cargo build -p grasp-audit --tests,
cargo clippy --all-targets --workspace, and cargo fmt all clean.
Lib unit tests (440) pass.
2026-06-16 11:31:26 +00:00

18 lines
523 B
Rust

//! Common test utilities
#![allow(dead_code)] // Test helpers may not be used in all test configurations
#![allow(unused_imports)] // Re-exports may not be used in all test configurations
pub mod git_server;
pub mod mock_relay;
pub mod port;
pub mod purgatory_helpers;
pub mod relay;
pub mod sync_helpers;
pub use git_server::{SimpleGitServer, SmartGitServer};
pub use mock_relay::MockRelay;
pub use port::{reserve_port, PortReservation};
pub use purgatory_helpers::*;
pub use relay::TestRelay;
pub use sync_helpers::*;