| Crates.io | runar_test_utils |
| lib.rs | runar_test_utils |
| version | 0.1.0 |
| created_at | 2025-08-14 12:40:19.10173+00 |
| updated_at | 2025-08-14 12:40:19.10173+00 |
| description | Test utilities for Runar crates |
| homepage | https://github.com/runar-labs/runar-rust |
| repository | https://github.com/runar-labs/runar-rust |
| max_upload_size | |
| id | 1794810 |
| size | 114,561 |
Test helpers for Runar crates: quick key setup, node configs, and a lightweight mobile simulator for integration tests.
[dev-dependencies]
runar_test_utils = "0.1"
use runar_test_utils::create_node_test_config;
let config = create_node_test_config()?;
// let mut node = runar_node::Node::new(config).await?;
use runar_test_utils::MobileSimulator;
use runar_common::logging::{Component, Logger};
use std::sync::Arc;
let logger = Arc::new(Logger::new_root(Component::System, "sim"));
let mut sim = MobileSimulator::new(logger)?;
sim.add_user_mobile("alice", &["personal", "work"])?;
let node_config = sim.create_node_config()?; // QUIC-ready config
create_test_mobile_keys() → (MobileKeyManager, network_id)create_test_node_keys(mobile, network_id) → (NodeKeyManager, node_id)create_node_test_config() → NodeConfigcreate_networked_node_test_config(n) → Vec<NodeConfig> (same network)create_simple_mobile_simulation() → MobileSimulatorcreate_test_environment() → (MobileSimulator, NodeConfig)Rust 1.70.0
MIT. See LICENSE.