-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
18 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use uuid::Uuid; | ||
|
||
/// Generate a UAID that is prefixed with the test-identification ID "DEADBEEF". | ||
/// Note: It's absolutely possible that this might cause a conflict with valid UAIDs, but | ||
/// the risk is reasonably small, and we could limit pruning to whenever we had | ||
/// accidentally run the test script against production. | ||
pub fn gen_test_uaid() -> Uuid { | ||
let temp = Uuid::new_v4(); | ||
let (_, d2, d3, d4) = temp.as_fields(); | ||
Uuid::from_fields(0xdeadbeef, d2, d3, d4) | ||
} |