diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-19 17:01:36 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-19 17:01:36 +0000 |
| commit | bf7f4d5381203d5c27b2811d62c5b1781533aa2b (patch) | |
| tree | 26903bbf535d83abd7242370d8b6932eb80e3389 /grasp-audit/src/isolation.rs | |
| parent | fa065ad128882755f2a988d6203b59a2ab5e38ff (diff) | |
fix some clippy fmt warnings
Diffstat (limited to 'grasp-audit/src/isolation.rs')
| -rw-r--r-- | grasp-audit/src/isolation.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/grasp-audit/src/isolation.rs b/grasp-audit/src/isolation.rs index 540da34..d0a2645 100644 --- a/grasp-audit/src/isolation.rs +++ b/grasp-audit/src/isolation.rs | |||
| @@ -11,7 +11,7 @@ pub fn generate_test_id() -> String { | |||
| 11 | .duration_since(std::time::UNIX_EPOCH) | 11 | .duration_since(std::time::UNIX_EPOCH) |
| 12 | .unwrap() | 12 | .unwrap() |
| 13 | .as_secs(); | 13 | .as_secs(); |
| 14 | 14 | ||
| 15 | format!("test-{}-{}", timestamp, counter) | 15 | format!("test-{}-{}", timestamp, counter) |
| 16 | } | 16 | } |
| 17 | 17 | ||
| @@ -26,29 +26,29 @@ pub fn generate_prod_run_id() -> String { | |||
| 26 | .duration_since(std::time::UNIX_EPOCH) | 26 | .duration_since(std::time::UNIX_EPOCH) |
| 27 | .unwrap() | 27 | .unwrap() |
| 28 | .as_secs(); | 28 | .as_secs(); |
| 29 | 29 | ||
| 30 | format!("prod-audit-{}", timestamp) | 30 | format!("prod-audit-{}", timestamp) |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | #[cfg(test)] | 33 | #[cfg(test)] |
| 34 | mod tests { | 34 | mod tests { |
| 35 | use super::*; | 35 | use super::*; |
| 36 | 36 | ||
| 37 | #[test] | 37 | #[test] |
| 38 | fn test_generate_test_id() { | 38 | fn test_generate_test_id() { |
| 39 | let id1 = generate_test_id(); | 39 | let id1 = generate_test_id(); |
| 40 | let id2 = generate_test_id(); | 40 | let id2 = generate_test_id(); |
| 41 | 41 | ||
| 42 | assert_ne!(id1, id2); | 42 | assert_ne!(id1, id2); |
| 43 | assert!(id1.starts_with("test-")); | 43 | assert!(id1.starts_with("test-")); |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | #[test] | 46 | #[test] |
| 47 | fn test_generate_ci_run_id() { | 47 | fn test_generate_ci_run_id() { |
| 48 | let id = generate_ci_run_id(); | 48 | let id = generate_ci_run_id(); |
| 49 | assert!(id.starts_with("ci-")); | 49 | assert!(id.starts_with("ci-")); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | #[test] | 52 | #[test] |
| 53 | fn test_generate_prod_run_id() { | 53 | fn test_generate_prod_run_id() { |
| 54 | let id = generate_prod_run_id(); | 54 | let id = generate_prod_run_id(); |