nextsync-rust/tests/utils/utils.rs
2024-03-17 00:20:58 +01:00

13 lines
292 B
Rust

use rand::{distributions::Alphanumeric, Rng};
#[cfg(test)]
pub fn get_random_test_id() -> String {
let mut id: String = rand::thread_rng()
.sample_iter(&Alphanumeric)
.take(7)
.map(char::from)
.collect();
id.push_str("_nextsync");
id.to_owned()
}