autopush_common/test_support.rs
1use uuid::Uuid;
2
3/// Generate a UAID that is prefixed with the test-identification ID "DEADBEEF".
4/// Note: It's absolutely possible that this might cause a conflict with valid UAIDs, but
5/// the risk is reasonably small, and we could limit pruning to whenever we had
6/// accidentally run the test script against production.
7pub fn gen_test_uaid() -> Uuid {
8 let temp = Uuid::new_v4();
9 let (_, d2, d3, d4) = temp.as_fields();
10 Uuid::from_fields(0xdeadbeef, d2, d3, d4)
11}