Skip to content

Commit 02c627d

Browse files
committed
break up code a bit and add tests
1 parent 1638ecc commit 02c627d

File tree

2 files changed

+534
-86
lines changed

2 files changed

+534
-86
lines changed

runtimes/core/src/api/reqauth/platform.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,19 @@ impl RequestValidator {
4343
Self { keys }
4444
}
4545

46+
#[cfg(test)]
47+
pub fn new_mock() -> Self {
48+
use crate::secrets::Secret;
49+
50+
Self {
51+
keys: [SigningKey {
52+
id: 123,
53+
data: Secret::new_for_test("secret data"),
54+
}]
55+
.into(),
56+
}
57+
}
58+
4659
pub fn validate_platform_request(
4760
&self,
4861
req: &ValidationData,

0 commit comments

Comments
 (0)