test(crypto): replace the one-file key scan with a repo-wide guard (#6246)

This commit is contained in:
Zhengchao An
2026-08-19 10:59:54 +08:00
committed by GitHub
parent 09fe561443
commit fa49f0ee4f
8 changed files with 295 additions and 11 deletions
-8
View File
@@ -203,14 +203,6 @@ mod tests {
assert!(result.is_err());
}
#[test]
fn test_source_does_not_embed_private_key() {
let source = include_str!("license_token.rs");
let forbidden = ["BEGIN", "PRIVATE KEY"].join(" ");
assert!(!source.contains(&forbidden));
}
#[test]
fn test_parse_signed_license_token_rejects_invalid_token() {
let mut rng = rand::rng();