db_testkit/
util.rs

1use uuid::Uuid;
2
3pub fn get_db_name() -> String {
4    format!(
5        "testkit_db_{}",
6        Uuid::new_v4().to_string().replace('-', "_")
7    )
8}
9
10#[cfg(test)]
11mod tests {
12    use super::*;
13
14    #[test]
15    fn test_get_db_name() {
16        let db_name = get_db_name();
17        assert!(
18            db_name.starts_with("testkit_db_"),
19            "db_name should start with testkit_db_"
20        );
21    }
22}